0% found this document useful (0 votes)
19 views

Session 2 Minimization of Boolean Functions Final

Session 2 Minimization of Boolean functions Final

Uploaded by

R Pirijatharsan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Session 2 Minimization of Boolean Functions Final

Session 2 Minimization of Boolean functions Final

Uploaded by

R Pirijatharsan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Mathematics for Computing

Session 2
Minimization of Boolean functions
Content
Introduction, p
2.1 Boolean functions, p
2.2 Karnaugh map, p
2.3 Basic definitions, p
2.4 Minimization by using Boolean algebra, p
2.5 Karnaugh map Minimization, p
Summary, p
Learning outcomes, p

Introduction
In this session, we will investigate the intricate concepts surrounding Boolean functions,
providing you with a comprehensive understanding. You will have the opportunity to explore
Karnaugh maps, a more dynamic tool for analyzing Boolean expressions compared to
traditional truth tables. It could be considered as a new version of a truth table. We aim to
equip you with a solid foundation by elucidating fundamental concepts such as literals,
minterms, maxterms, and sum of products (SOP), which are essential for the efficient
minimization of Boolean functions. Through detailed explanations, we will demonstrate the
application of Boolean algebra techniques to streamline the minimization process.
Specifically, we will thoroughly examine the utilization of Karnaugh maps as a powerful
method for minimizing Boolean functions.

In contrast to algebraic methods, which heavily involve manipulations in Boolean algebra,


Karnaugh maps offer a graphical depiction of truth tables, facilitating the detection of
patterns and redundancies in logical expressions.

1
Unit III – Boolean algebra

2.1 Boolean functions


Boolean function
A function of the form 𝑓: 𝐵 𝑛 → 𝐵, where {0, 1} and 𝑛 ∈ ℤ+ is defined as an
𝑛 −variable Boolean function. In other words, any function with the domain 𝐵𝑛 and the co-
domain 𝐵, where 𝐵 = {0, 1} is defined as an 𝑛 −variable Boolean function.

Boolean functions are denoted by:


• Functions of one variable 𝑓(𝑥), 𝑔(𝑥) … …
o For example: 𝑓(𝑥) = 𝑥̅ .
• Function of two variables 𝑓(𝑥, 𝑦), 𝑔(𝑎, 𝑏) … …
o For example: 𝑓(𝑥, 𝑦) = 𝑥̅ 𝑦 + 𝑥𝑦̅.
• Function of three variables 𝑓(𝑥, 𝑦, 𝑧), 𝑔(𝑎, 𝑏, 𝑐) … …
o For example: 𝑔(𝑎, 𝑏, 𝑐) = 𝑎̅𝑏𝑐 + 𝑎𝑐̅.
• Function of 𝑛 variables 𝑓(𝑥1 , 𝑥2 , 𝑥3 … … 𝑥𝑛 ), 𝑔(𝑎1 , 𝑎2 , 𝑎3 … … 𝑎𝑛 ) … …
o For example: 𝑔(𝑎1 , 𝑎2 , 𝑎3 … … 𝑎𝑛 ) = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅.
𝑎1 𝑎2 𝑎3 … … 𝑎𝑛

2.2 Karnaugh map


A Karnaugh map is defined as a tabular representation of a Boolean function that contains
multiple Boolean variables. Within this table, each cell is explicitly indicated to represent the
output value associated with a particular input combination for the function. The number of
cells in the table is linked to the number of variables in the Boolean function; specifically, if
the function has 𝑛 number of variables, the table must encompass 2𝑛 number of cells to
comprehensively account for all possible input combinations.

2
Mathematics for Computing

1. Example
Find the Karnaugh map for the following truth table.
𝑥 𝑦 𝑓(𝑥, 𝑦)
0 0 1
0 1 0
1 0 1
1 1 1

𝑥
0 1
𝑦

0 1 1

1 0 1

2. Example
Find the Karnaugh map for the following truth table.
a 𝑏 𝑐 𝑔(𝑎, 𝑏, 𝑐)
0 0 0 1 ab
00 01 11 10
0 0 1 0 𝑐
0 1 0 1 0 1 1 0 1
0 1 1 0
1 0 0 1 1 0 0 1 0
1 0 1 0
1 1 0 0
1 1 1 1

3
Unit III – Boolean algebra

3. Example
Find the Karnaugh map for the following truth table.

w 𝑥 𝑦 𝑧 𝑔(𝑤, 𝑥, 𝑦, 𝑧)
0 0 0 0 0
0 0 0 1 1
yz
0 0 1 0 0 00 01 11 10
𝑤𝑥
0 0 1 1 1 00 0 1 1 0
0 1 0 0 0
01 0 1 0 0
0 1 0 1 1
0 1 1 0 0 11 0 0 1 0
0 1 1 1 0 10 1 0 1 1
1 0 0 0 1
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1

2.3 Basic definitions


In the following section, we define literals, minterm, maxterm, sum of products, products of
sums and canonical form of Boolean function that are used to express Boolean functions.

2.3.1 Definition of Literals


In the context of a Boolean function, a literal is defined as either normal form of the variable
or complemented form of the variable in the function. Each variable and its complemented
form within the Boolean function is considered different literals, influencing the overall logic
of the function. If a Boolean function has 𝑛 number of variables, then it has maximum of 2𝑛
number of literals. The number of literals in a Boolean function is the count of individual
variables and their complements within the function. In other words, the total number of

4
Mathematics for Computing

literals in a Boolean function is determined by the sum of these distinct variables and their
complements present in the expression.

4. Example
̅ are the literals of the
Let 𝑓(𝐴) be a Boolean function of the variable 𝐴. Then 𝐴 and 𝐴
function 𝑓(𝐴).

5. Example
Let 𝑔(𝑥, 𝑦) be a Boolean function of the variables 𝑥 and 𝑦. Then 𝑥, 𝑦, 𝑥̅ and 𝑦
̅ are the literals
of the function 𝑔(𝑥, 𝑦).

6. Example
̅ 𝑏̅ and 𝑐̅ are the
Let 𝐹(𝑎, 𝑏, 𝑐) be a Boolean function of the variables 𝑎, 𝑏 and 𝑐. Then 𝑎, 𝑏, 𝑐, 𝑎,
literals of the function 𝐹(𝑎, 𝑏, 𝑐).

2.3.2 Definition of minterm


A minterm for a specific input of a Boolean function is defined as the product of literals of
the function with the following three conditions.
• If the value of a variable is 1, then the variable is represented in its normal form.
• If the value of a variable is 0, then the variable is represented in its complemented
form.
• Each variable appears exactly once in a product term, either in its normal form or
complemented form of these variable representations.
Minterms of a two variable Boolean function

Variable Minterm
𝐴 𝐵 Term Representation
0 0 ̅𝐵
𝐴 ̅ 𝑚0
0 1 ̅𝐵
𝐴 𝑚1
1 0 𝐴𝐵̅ 𝑚2
1 1 𝐴𝐵 𝑚3

5
Unit III – Boolean algebra

Minterms of a three variable Boolean function


Variable Minterm
𝐴 𝐵 𝐶 Term Representation
0 0 0 ̅𝐵
𝐴 ̅𝐶
̅ 𝑚0
0 0 1 ̅𝐵
𝐴 ̅𝐶 𝑚1
0 1 0 ̅ 𝐵𝐶
𝐴 ̅ 𝑚2
0 1 1 ̅ 𝐵𝐶
𝐴 𝑚3
1 0 0 𝐴𝐵̅ 𝐶̅ 𝑚4
1 0 1 𝐴𝐵̅ 𝐶 𝑚5
1 1 0 𝐴𝐵𝐶̅ 𝑚6
1 1 1 𝐴𝐵𝐶 𝑚7

Minterms of a four variable Boolean function


Variables Minterms
𝑤 𝑥 𝑦 𝑧 Terms Representation
0 0 0 0 𝑤
̅̅𝑥𝑦
̅𝑧̅ 𝑚0
0 0 0 1 𝑤
̅̅𝑥𝑦
̅𝑧 𝑚1
0 0 1 0 𝑤
̅𝑥̅𝑦𝑧̅ 𝑚2
0 0 1 1 𝑤
̅𝑥̅𝑦𝑧 𝑚3
0 1 0 0 𝑤
̅ 𝑥𝑦
̅𝑧̅ 𝑚4
0 1 0 1 𝑤
̅ 𝑥𝑦
̅𝑧 𝑚5
0 1 1 0 𝑤
̅ 𝑥𝑦𝑧̅ 𝑚6
0 1 1 1 𝑤
̅ 𝑥𝑦𝑧 𝑚7
1 0 0 0 𝑤𝑥̅ 𝑦̅𝑧̅ 𝑚8
1 0 0 1 𝑤
̅ 𝑥𝑦𝑧̅ 𝑚9
1 0 1 0 𝑤𝑥̅ 𝑦𝑧̅ 𝑚10
1 0 1 1 𝑤𝑥̅ 𝑦𝑧 𝑚11
1 1 0 0 𝑤𝑥𝑦̅𝑧̅ 𝑚12
1 1 0 1 𝑤𝑥𝑦̅𝑧 𝑚13
1 1 1 0 𝑤𝑥𝑦𝑧̅ 𝑚14
1 1 1 1 𝑤𝑥𝑦𝑧 𝑚15

6
Mathematics for Computing

2.3.3 Definition of maxterm


A maxterm for a specific input of a Boolean function is defined as the sum of literals of the
function with the following three conditions.
• If the value of a variable is 1, then the variable is represented in its complemented
form.
• If the value of a variable is 0, then the variable is represented in its normal form.
• Each variable appears exactly once in a sum term, either in its normal form or
complemented form of these variable representations.
Maxterms of a two variable Boolean function

Variable Maxterm
𝐴 𝐵 Term Representation
0 0 𝐴+𝐵 𝑀0
0 1 𝐴 + 𝐵̅ 𝑀1
1 0 ̅ +𝐵
𝐴 𝑀2
1 1 ̅ +𝐵
𝐴 ̅ 𝑀3

Maxterms of a three variable Boolean function

Variable Maxterm
𝐴 𝐵 𝐶 Term Representation
0 0 0 𝐴+𝐵+𝐶 𝑀0
0 0 1 𝐴 + 𝐵 + 𝐶̅ 𝑀1
0 1 0 𝐴 + 𝐵̅ + 𝐶 𝑀2
0 1 1 𝐴 + 𝐵̅ + 𝐶̅ 𝑀3
1 0 0 ̅ +𝐵+𝐶
𝐴 𝑀4
1 0 1 ̅ +𝐵+𝐶
𝐴 ̅ 𝑀5
1 1 0 ̅ +𝐵
𝐴 ̅ +𝐶 𝑀6
1 1 1 ̅ +𝐵
𝐴 ̅ +𝐶
̅ 𝑀7

2.3.4 Definition of Sum of Product


The Sum of Products expression is a representation of a Boolean function achieved by
summing the minterms for which the output is equal to 1. It is denoted by SOP. In essence,
SOP is the result of adding all minterms of a Boolean function where the output is 1.
Expression of SOP is also recognized as the disjunctive normal form (DNF) of the Boolean
function.

7
Unit III – Boolean algebra

7. Example
Using SOP, find an expression for Boolean function corresponding the following truth table.
A 𝐵 𝐶 𝑓(𝐴, 𝐵, 𝐶) Minterm
0 0 0 1 ̅𝐵
𝐴 ̅𝐶̅
0 0 1 0 ̅ ̅
𝐴𝐵𝐶
0 1 0 0 ̅ 𝐵𝐶
𝐴 ̅
0 1 1 1 ̅ 𝐵𝐶
𝐴
1 0 0 1 𝐴𝐵̅ 𝐶̅
1 0 1 0 𝐴𝐵̅ 𝐶
1 1 0 1 𝐴𝐵𝐶̅
1 1 1 0 𝐴𝐵𝐶
𝑓(𝐴, 𝐵, 𝐶) = 𝐴̅𝐵̅ 𝐶̅ + 𝐴̅𝐵𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵𝐶̅

2.3.5 Definition of Product of Sum


The Product of Sums expression is a representation of a Boolean function achieved by
multiplying together the maxterms for which the output is equal to 0. Denoted by POS, this
expression is also recognized as the conjunctive normal form (CNF) of the Boolean function.
In simpler terms, POS is the result of taking the product of all maxterms of a Boolean
function where the output is 0.

8. Example
Using POS, find an expression for Boolean function corresponding the following truth table.
A 𝐵 𝐶 𝑓(𝐴, 𝐵, 𝐶) Maxterm
0 0 0 1 𝐴+𝐵+𝐶
0 0 1 0 𝐴+𝐵+𝐶 ̅
0 1 0 0 𝐴+𝐵̅ +𝐶
0 1 1 1 𝐴+𝐵̅ +𝐶 ̅
1 0 0 1 ̅ +B+C
𝐴
1 0 1 0 ̅ +𝐵+𝐶
𝐴 ̅
1 1 0 1 ̅
𝐴+𝐵+𝐶̅
1 1 1 1 ̅ +𝐵
𝐴 ̅ +𝐶 ̅
𝑓(𝐴, 𝐵, 𝐶) = (𝐴 + 𝐵̅ + 𝐶)(𝐴 + 𝐵̅ + 𝐶)(𝐴̅ + 𝐵 + 𝐶̅ )

2.3.6 Expression for any Boolean function


The expression for any Boolean function can be derived from its truth table by taking the sum
of all the minterms corresponding to instances where the value of the function is equal to 1,
or by taking the product of all the maxterms corresponding to instances where the value of
the function is equal to 0.

8
Mathematics for Computing

9. Example
Using SOP, find an expression for Boolean function corresponding the following truth table.
A 𝐵 𝐶 𝑓(𝐴, 𝐵, 𝐶) Minterm
0 0 0 1 ̅𝐵
𝐴 ̅𝐶̅
0 0 1 0 ̅ ̅
𝐴𝐵𝐶
0 1 0 0 ̅ 𝐵𝐶
𝐴 ̅
0 1 1 1 ̅ 𝐵𝐶
𝐴
1 0 0 1 𝐴𝐵̅ 𝐶̅
1 0 1 0 𝐴𝐵̅ 𝐶
1 1 0 0 𝐴𝐵𝐶̅
1 1 1 0 𝐴𝐵𝐶
𝑓(𝐴, 𝐵, 𝐶) = 𝐴̅𝐵̅ 𝐶̅ + 𝐴̅𝐵𝐶 + 𝐴𝐵̅ 𝐶̅

2.3.7 Canonical form of a Boolean function


Any Boolean function that is expressed as a sum of minterms or as a product of maxterms is said to be
in its canonical form.

10. Example
Using SOP and POS, find an expression for Boolean function corresponding the following
truth table.
A 𝐵 𝐶 𝑓(𝐴, 𝐵, 𝐶) Minterm Maxterm
0 0 0 1 ̅
𝐴𝐵𝐶̅ ̅ 𝐴+𝐵+𝐶
0 0 1 0 ̅
𝐴𝐵𝐶̅ 𝐴 + 𝐵 + 𝐶̅
0 1 0 0 𝐴̅ 𝐵𝐶̅ 𝐴 + 𝐵̅ + 𝐶
0 1 1 1 ̅
𝐴𝐵𝐶 𝐴 + 𝐵̅ + 𝐶̅
1 0 0 1 𝐴𝐵̅ 𝐶̅ 𝐴̅ + 𝐵 + 𝐶
1 0 1 0 𝐴𝐵̅ 𝐶 𝐴̅ + 𝐵 + 𝐶̅
1 1 0 1 𝐴𝐵𝐶̅ 𝐴̅ + 𝐵̅ + 𝐶
1 1 1 0 𝐴𝐵𝐶 𝐴̅ + 𝐵̅ + 𝐶̅
𝑓(𝐴, 𝐵, 𝐶) = 𝐴̅𝐵̅ 𝐶̅ + 𝐴̅𝐵𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵𝐶̅ by SOP.
𝑓(𝐴, 𝐵, 𝐶) = (𝐴 + 𝐵 + 𝐶̅ )(𝐴 + 𝐵 ̅ + 𝐵 + 𝐶̅ )(𝐴
̅ + 𝐶)(𝐴 ̅+𝐵
̅ + 𝐶̅ ) by POS.

2.4 Minimization of Boolean function using Boolean algebra


Minimization of Boolean functions using Boolean algebra involves simplifying the
expression to its most compact form without changing its functionality.

11. Example
Consider 𝐹(𝐴, 𝐵) = 𝐴 + 𝐵. It is not a SOP form or POS form. Therefore, it is not a
canonical form.

9
Unit III – Boolean algebra

𝐹(𝐴, 𝐵) = 𝐴 + 𝐵 = 𝐴. 1 + 𝐵. 1 by identity law


= 𝐴(𝐵 + 𝐵̅ ) + 𝐵(𝐴 + 𝐴̅) by complement law = 𝐴𝐵 + 𝐴𝐵̅ + 𝐵𝐴 + 𝐵𝐴̅ by distributive law
= 𝐴𝐵 + 𝐴𝐵 + 𝐴𝐵̅ + 𝐴̅𝐵 by commutative law
𝐹(𝐴, 𝐵) = 𝐴𝐵 + 𝐴𝐵̅ + 𝐴̅𝐵 by idempotent law
This is of the form of SOP. Therefore, it is a canonical form of SOP.

12. Example
Consider 𝐹(𝐴, 𝐵, 𝐶) = 𝐴 + 𝐵𝐶 + 𝐴𝐶. It is not a SOP form or POS form. Therefore, it is not
a canonical form.
𝐹(𝐴, 𝐵) = 𝐴 + 𝐵 = 𝐴. 1 + 𝐵𝐶. 1 + 𝐴𝐶. 1 by identity law
= 𝐴(𝐵 + 𝐵̅ )(𝐶 + 𝐶̅ ) + 𝐵𝐶(𝐴 + 𝐴̅) + 𝐴𝐶(𝐵 + 𝐵̅ ) by complement law
= 𝐴𝐵𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵𝐶̅ + 𝐴𝐵̅ 𝐶 + 𝐵𝐶𝐴 + 𝐵𝐶𝐴̅ + 𝐴𝐶𝐵 + 𝐴𝐶𝐵̅ by distributive law
= 𝐴𝐵𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵𝐶̅ + 𝐴𝐵̅ 𝐶 + 𝐴𝐵𝐶 + 𝐴̅𝐵𝐶 + 𝐴𝐵𝐶 + 𝐴𝐵̅ 𝐶 by commutative law
= (𝐴𝐵𝐶 + 𝐴𝐵𝐶 + 𝐴𝐵𝐶) + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵𝐶̅ + (𝐴𝐵̅ 𝐶 + 𝐴𝐵̅ 𝐶) + 𝐴̅𝐵𝐶
= 𝐴𝐵𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵𝐶̅ + 𝐴𝐵̅ 𝐶 + 𝐴̅𝐵𝐶 by idempotent law
This is of the form of SOP. Therefore, it is a canonical form of SOP.

2.4.1 Standard form of a Boolean function


The sum of products or products of sums form with all the literals in the Boolean function is defined
as a standard form of the function. The standard form of a Boolean function is defined by expressing
it in either the sum of products (SOP) or products of sums (POS) form, where each term encompasses
all the literals of the Boolean function. This standard representation ensures a comprehensive and
explicit formulation of the function, maintaining the logical relationships through the inclusion of all
possible combinations of literals in the expression.

Examples for:
Product terms: 𝑎, 𝑎𝑏, 𝑎𝑏̅𝑐, 𝑎𝑏, 𝑎̅𝑏̅𝑐̅, 𝑎𝑏𝑐 … ….
Minterms: 𝑎̅𝑏𝑐, 𝑎𝑏̅𝑐, 𝑎𝑏̅𝑐̅, 𝑎̅𝑏𝑐̅, 𝑎̅𝑏̅𝑐̅, 𝑎𝑏𝑐 … ….
Sum terms: 𝑎, 𝑎 + 𝑏, 𝑏 + 𝑐, 𝑎 + 𝑏 + 𝑐̅, 𝑎̅ + 𝑏̅ + 𝑐, … …
Maxterms: 𝑎̅ + 𝑏 + 𝑐, 𝑎 + 𝑏̅ + 𝑐, 𝑎 + 𝑏̅ + 𝑐̅, 𝑎̅ + 𝑏 + 𝑐̅, 𝑎̅ + 𝑏̅ + 𝑐̅, 𝑎 + 𝑏 + 𝑐 … …
Notice that 𝑎, 𝑏 and 𝑐 are Boolean variables.

2.4.2 Dual
The dual of a Boolean function is the expression one obtains by interchanging the addition and
multiplication and interchanging 0’s and 1’s. The dual of a function 𝐹 is denoted by 𝐹 𝑑 .

10
Mathematics for Computing

13. Example
Use the SOP to find an expression for the Boolean function corresponding to the
following truth table.
Input Output
𝑥 𝑦 𝑓(𝑥, 𝑦) Product terms
0 0 1 𝑥𝑦
̅ ̅
0 1 0 ̅𝑦
𝑥
1 0 1 𝑥𝑦̅
1 1 1 𝑥𝑦

SOP for the above truth table is 𝑓(𝑥, 𝑦) = 𝑥̅ 𝑦̅ + 𝑥𝑦̅ + 𝑥𝑦. 𝑓(𝑥, 𝑦) may be simplified as
follows.
𝑓(𝑥, 𝑦) = 𝑥̅ 𝑦̅ + 𝑥𝑦̅ + 𝑥𝑦 = 𝑥̅ 𝑦̅ + 𝑥(𝑦̅ + 𝑦) by distributive law
= 𝑥̅ 𝑦̅ + 𝑥. 1 by compliment law = 𝑥̅ 𝑦̅ + 𝑥 by identity law
= 𝑥 + 𝑥̅ 𝑦̅ by commutative law 𝑓(𝑥, 𝑦) = 𝑥 + 𝑦̅ by degenerate-reflect

14. Example
Use the SOP to find an expression for Boolean function corresponding to the following truth
table. Using Boolean algebra, simplify that expression.
A 𝐵 𝐶 𝑓(𝐴, 𝐵, 𝐶) Minterm
0 0 0 0 ̅𝐵
𝐴 ̅𝐶
̅

0 0 1 1 ̅𝐵
𝐴 ̅𝐶

0 1 0 0 ̅ 𝐵𝐶
𝐴 ̅

0 1 1 0 ̅ 𝐵𝐶
𝐴
1 0 0 1 𝐴𝐵̅ 𝐶̅
1 0 1 1 𝐴𝐵̅ 𝐶
1 1 0 1 𝐴𝐵𝐶̅
1 1 1 1 𝐴𝐵𝐶

SOP for the above truth table is 𝑓(𝐴, 𝐵, 𝐶) = 𝐴̅𝐵̅ 𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵̅ 𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶.
𝑓(𝐴, 𝐵, 𝐶) may be simplified as follows.
𝑓(𝐴, 𝐵, 𝐶) = 𝐴̅𝐵̅ 𝐶̅ + 𝐴̅𝐵̅ 𝐶 + 𝐴𝐵̅ 𝐶̅ + 𝐴𝐵̅ 𝐶 + 𝐴𝐵𝐶̅ + 𝐴𝐵𝐶

11
Unit III – Boolean algebra

= 𝐴̅𝐵̅ 𝐶̅ + 𝐴̅𝐵̅ 𝐶 + 𝐴𝐵̅ (𝐶̅ + 𝐶) + 𝐴𝐵(𝐶̅ + 𝐶) by distributive law


= 𝐴̅𝐵̅ 𝐶 + 𝐴𝐵̅ . 1 + 𝐴𝐵. 1 by complement law
= 𝐴̅𝐵̅ 𝐶 + 𝐴𝐵̅ + 𝐴𝐵 by identity law = 𝐴̅𝐵̅ 𝐶 + 𝐴(𝐵̅ + 𝐵) by distributive law
= 𝐴̅𝐵̅ 𝐶 + 𝐴. 1 by complement law = 𝐴̅𝐵̅ 𝐶 + 𝐴 by identity law
= 𝐴 + 𝐴̅𝐵̅ 𝐶 by commutative law
𝑓(𝐴, 𝐵, 𝐶) = 𝐴 + 𝐵̅ 𝐶 by degenerate-reflect 𝑓(𝐴, 𝐵, 𝐶) = 𝐴 + 𝐵̅ 𝐶

15. Example
Use the POS to find an expression for Boolean function corresponding to the following truth
table. Using Boolean algebra, simplify that expression.
A 𝐵 𝐶 𝑓(𝐴, 𝐵, 𝐶) Maxterm
0 0 0 0 𝐴+𝐵+𝐶
0 0 1 1 𝐴 + 𝐵 + 𝐶̅
0 1 0 0 𝐴 + 𝐵̅ + 𝐶
0 1 1 0 𝐴 + 𝐵̅ + 𝐶̅
1 0 0 1 ̅ +𝐵+𝐶
𝐴
1 0 1 1 ̅ +𝐵+𝐶
𝐴 ̅
1 1 0 1 ̅ +𝐵
𝐴 ̅ +𝐶
1 1 1 1 ̅ +𝐵
𝐴 ̅ +𝐶
̅

POS for the above truth table is


𝑓(𝐴, 𝐵, 𝐶) = (𝐴 + 𝐵 + 𝐶)(𝐴 + 𝐵̅ + 𝐶)(𝐴 + 𝐵̅ + 𝐶̅ ).
𝑓(𝐴, 𝐵, 𝐶) may be simplified as follows.
𝑓(𝐴, 𝐵, 𝐶) = (𝐴 + 𝐵 + 𝐶)(𝐴 + 𝐵̅ + 𝐶)(𝐴 + 𝐵̅ + 𝐶̅ )
= (𝐴 + 𝐶 + 𝐵)(𝐴 + 𝐶 + 𝐵̅ )(𝐴 + 𝐵̅ + 𝐶̅ )by commutative law
= (𝐴 + 𝐶 + 𝐵𝐵̅ )(𝐴 + 𝐵̅ + 𝐶̅ )by distributive law
= (𝐴 + 𝐶 + 0)(𝐴 + 𝐵̅ + 𝐶̅ )by complement law
= (𝐴 + 𝐶)(𝐴 + 𝐵̅ + 𝐶̅ ) by identity law
= 𝐴 + 𝐶(𝐵̅ + 𝐶̅ ) by distributive law
= 𝐴 + 𝐶𝐵̅ + 𝐶𝐶̅ by distributive law
= 𝐴 + 𝐶𝐵̅ + 0 by complement law
𝑓(𝐴, 𝐵, 𝐶) = 𝐴 + 𝐵̅ 𝐶 by identity law and commutative law 𝑓(𝐴, 𝐵, 𝐶) = 𝐴 + 𝐵̅ 𝐶
Notice that the Boolean function, derived by using the method of SOP and the method of
POS are the same after simplifications.

12
Mathematics for Computing

1.5 Minimization of Boolean function using Karnaugh map


A Karnaugh map offers a structured approach to streamline Boolean expressions efficiently.
When utilized effectively, it yields the most concise Sum of Products (SOP) or Product of
Sums (POS) expression achievable, commonly referred to as the minimal expression. Your
proficiency of axioms, laws, and theorems in Boolean algebra, combined with your adeptness
in their application, significantly influences the efficacy of algebraic simplification, as you
have observed.

1.5.1 Karnaugh Map Simplification of SOP Expressions


Karnaugh Map Minimization Procedure of a Boolean function includes the following four
steps:
Karnaugh Map (K-map) minimization procedure
1. Construct a K-map: Draw the K-map based on the given truth table or Boolean
function.
2. Identify groups of adjacent cells containing 1:
a. Starting from the top-left cell, examine adjacent cells (horizontally and vertically)
to form groups containing 1s. Each group must be rectangular or square and can
consist of 1, 2, 4, 8, or 16 cells.
b. Maximize the size of each group. If a cell can belong to multiple groups, prioritize
forming larger groups.
c. Ensure that each cell with a 1 on the K-map is covered at least once. A cell can be
included in multiple groups if necessary.
d. Select the minimum number of groups required to cover all the 1s on the K-map.
e. Consider adjacency across both vertical and horizontal borders while forming
groups.
3. Translate each group into a product term:
a. For each group of adjacent cells containing 1, identify the corresponding
Boolean product term.
b. A product term is formed by considering the variables whose values remain
constant within the group. Variables whose values change from cell to cell
within the group are dropped from the term.

13
Unit III – Boolean algebra

c. Express each product term in terms of the variables and their respective states
(either complemented or uncomplemented) based on the cells contained in the
group.
4. Sum all the product terms:
a. After translating each group into a product term, sum up all the product terms
to obtain the simplified Boolean expression.
b. Combine redundant terms, if any, to further minimize the expression.
c. The resulting expression represents the minimized form of the original
Boolean function, derived using K-map minimization techniques.
K-Map is one of the most efficient simplification tools when the number of variables in the
Boolean expression are less than or equal to four. However, for five, six, and more variables,
the K-Map becomes quite difficult.

Examples for grouping Karnaugh Map Simplification of SOP Expressions

C 𝐶 𝐶
0 1 0 1 C 00 01 11 10
𝐴𝐵 𝐴𝐵 00 01 11 10 𝐴𝐵
𝐴𝐵
00 1 00 1 1 00 1 1
00 1 1
01 1 01 1 01 1 1 1
01 1 1 1 1
11 1 1
11 1 11 1 1 1
11
10 10 1 1 10 1 1 1
10 1 1

𝐺1 𝐺1
𝐺1 𝐺2 𝐺1
1 𝐺2 1
1
C 1 𝐶 C 𝐶
0 1 0 1 00 01 11 10 00 01 11 10
𝐴𝐵 𝐴𝐵 𝐴𝐵 𝐴𝐵
00 1 00 1 1 00 1 1 00 1 1
01 1 01 1 01 1 1 1 1 01 1 1 1
11 1 1
11 1 11 11 1 1 1
10 10 1 1 10 1 1 1
10 1 1

𝐺3 𝐺2 𝐺3 𝐺3 𝐺2 𝐺3
1 1 1 1

14
Mathematics for Computing

16. Example
Find the Karnaugh map corresponding to the following truth table. Using that map, minimize
the corresponding Boolean function.
x 𝑦 𝑓(𝑥, 𝑦) 𝑥 Group 1 Group 2
0 1
Group 1 𝑦
0 0 1 𝑥 𝑦 𝑥 𝑦
0 1 1
0 1 0 0 0 1 0
Group 2
1 0 1 1 0 1 1 0 1 1
1 1 1 𝑦
̅ 𝑥

The two cells of the first row are one group (Group 1). The two cells of the last column are
the second group (Group 2). All the 1s in the cells are covered by the two groups.
In the Group 1 𝑦 is the only input to remain constant for all two cells: 𝑦 is always 0. This
means that for this group, the product must output of the inverse of 𝑦 equals 1.
In the Group 2 𝑥 is the only input to remain constant for all two cells: 𝑥 is always 1. This
means that for this group, the product must output of 𝑥 equals 1.
Hence the minimized function is given by 𝑓(𝑥, 𝑦) = 𝑥 + 𝑦̅.

17. Example
Find the Karnaugh map for the following truth table. Using that map, minimize the
corresponding Boolean function.
a 𝑏 𝑐 𝑔(𝑎, 𝑏, 𝑐) Group 1
0 0 0 1
bc
0 0 1 1 00 01 11 10
𝑎
0 1 0 1
0 1 1 1 0 1 1 1 1
1 0 0 0
1 0 1 0 1 0 0 1 0
1 1 0 0
1 1 1 1
Group 2

Next recognize the groups. It is clear that the first row 1 of the map is the first group (Group
1). The second group (Group 2) is the second column.

15
Unit III – Boolean algebra

Group 1
𝑎 𝑏 𝑐 Group 2

0 0 0 𝑎 𝑏 𝑐

0 0 1 0 1 1

0 1 0 1 1 1

0 1 1 𝑏𝑐

𝑎
̅

Only the variable 𝑎 in the Group 1 remains constant 0 for all the four cells in the map. This
means that output must be product inverse of 𝑎. In the Group 2, 𝑏 and 𝑐 remain constants 0
and 1 respectively. Therefore, output must be product of 𝑏 and 𝑐
Hence, the minimized function is given by 𝑔(𝑎, 𝑏, 𝑐) = 𝑎̅ + 𝑏𝑐.

18. Example
Find the Karnaugh map for the following truth table. Minimize the Boolean function.

w 𝑥 𝑦 𝑧 𝑔(𝑤, 𝑥, 𝑦, 𝑧)
0 0 0 0 1 Group 3
0 0 0 1 0
0 0 1 0 1
yz
0 0 1 1 0 00 01 11 10
𝑤𝑥
0 1 0 0 0
0 1 0 1 0 00 1 0 0 1
0 1 1 0 0
0 1 1 1 0 01 0 0 0 0
1 0 0 0 1
1 0 0 1 1 11 0 0 1 1
1 0 1 0 1
1 0 1 1 1 10 1 1 1 1
1 1 0 0 0
1 1 0 1 0
Group 1 Group 2
1 1 1 0 1
1 1 1 1 1

16
Mathematics for Computing

Answer:
First, we need to convert the truth table to a Karnaugh map.
Grouping
Group 1
Group 1 consists of all four cells of the bottom row.
Group 2
The four cells comprising the lower right corner quadrant of the map make up a second
group.
Group 3
Less obvious is the third group that takes care of the two cells in the top row that contain 1s.
Group 3 is a group that can wrap from the left side of the map to the right side of the map.
That means that these two cells are adjacent. What is less obvious is that this group can wrap
around from top to bottom too making it a four-cell group.
You can see that the bottom right cell is covered by three groups. The only requirement is that
no group can be fully covered by other group and that no cell with a 1 be left uncovered.
Now let us find the products of each group.

Group 1 Group 2 Group 3


𝑤 𝑥 𝑦 𝑧 𝑤 𝑥 𝑦 𝑧 𝑤 𝑥 𝑦 𝑧
1 0 0 0 1 1 1 1 0 0 0 0
1 0 0 1 1 1 1 0 0 0 1 0
1 0 1 1 1 0 1 1 1 0 0 0
1 0 1 0 1 0 1 0 1 0 1 0
𝑤𝑥̅ 𝑤𝑦 𝑥𝑧̅
̅

In the Group 1, 𝑤 and 𝑥 are the only inputsi to remain constant for all four cells: 𝑤 is always
1 and 𝑥 is always 0. This means that for this group, the product must output a one when 𝑤
equals 1 and 𝑥 equals 0, i.e., the inverse of 𝑥 equals 1. This gives us our first product.
Product for Group 1= 𝑤𝑥̅
The product for Group 2 is found the same way. Below is a list of the values for 𝑤, 𝑥, 𝑦 and 𝑧
for each cell of Group 2.
In this rectangle, 𝑤 and 𝑦 are the only ones that remain constant across all of the cells. To
make the corresponding product equal to one, they must both equal one.
Product for Group 2= 𝑤𝑦

17
Unit III – Boolean algebra

In the Group 3, 𝑥 and 𝑧 are the only ones that remain constant across all of the cells. To make
the corresponding product equal to one, they must both equal 0, i.e., their inverses must equal
1. Product for Group 3= 𝑥̅ 𝑧̅
From these three products, we obtain our final SOP expression by getting sum them together.
𝑔(𝑤, 𝑥, 𝑦, 𝑧) = 𝑤𝑥̅ + 𝑤𝑦 + 𝑥̅ 𝑧̅
This is a significant simplification over what we would have gotten had we created a product
for each row in the truth table. Since the four-input truth table had eight ones in it, the
resulting SOP expression would have had eight products each with four input variables.
With practice, many Karnaugh map users can see the variables that will drop out of each
rectangle without having to enumerate the input values for every cell. They usually do this by
seeing where the rectangle spans variable changes for the rows and columns and drop out
those variables. This skill is not necessary, however. Anyone can see which variables drop out
by making a list of the bit patterns for each cell in the rectangle and identifying which input
variables stay the same and which take on both one and zero as values.

1.5.2 Karnaugh Map Simplification of POS Expressions


The process for minimizing a POS expression is basically the same as for an SOP expression
except that you group 0s to produce minimum sum terms instead of grouping 1s to produce
minimum product terms. The rules for grouping the 0s are the same as those for grouping the
1s that you learned before.

19. Example
Find the Karnaugh map for the following truth table. Using that map, minimize the
corresponding Boolean function.
a 𝑏 𝑐 𝑔(𝑎, 𝑏, 𝑐) Group 1
0 0 0 1
0 0 1 1 bc
00 01 11 10
𝑎
0 1 0 1
0 1 1 1
0 1 1 1 1
1 0 0 0
1 0 1 0
1 1 0 0 1 0 0 1 0
1 1 1 1
Group 2
𝑔(𝑎, 𝑏, 𝑐) = (𝑎̅ + 𝑏 + 𝑐)(𝑎̅ + 𝑏 + 𝑐̅)(𝑎̅ + 𝑏̅ + 𝑐)

18
Mathematics for Computing

Next recognize the groups. The first two cells of the second row of the map is the first group
(Group 1). The second group (Group 2) is the last cell of the second row.
Group 1 Group 2
𝑎 𝑏 𝑐 𝑎 𝑏 𝑐
1 0 0 1 1 0
1 0 1 1 0 0
𝑎
̅+𝑏 𝑎
̅+𝑐

The variables 𝑎 and 𝑏 in the Group 1 remains constant 1 and 0 for all the eight cells in the
̅. In the Group 2, 𝑎, 𝑏 and 𝑐
map. This means that output must be sum of inverse 𝑎 and 𝑏
remain constants 1, 1 and 0 respectively. Therefore, output must be sum of 𝑎, 𝑏 and 𝑐̅
Hence, the minimized function is given by 𝑔(𝑎, 𝑏, 𝑐) = (𝑎̅ + 𝑏)(𝑎̅ + 𝑐).

20. Example
Let 𝐹(𝑥, 𝑦, 𝑧) = 𝑥̅ 𝑦 + 𝑦𝑧̅ + 𝑦𝑧 + 𝑥𝑦̅𝑧̅, where 𝑥, 𝑦 and 𝑧 are Boolean varables.
a) Using Boolean algebra, minimize 𝐹(𝑥, 𝑦, 𝑧).
b) Write down the truth table and the Karnaugh map.
c) Find the SOP and POS expressions for 𝐹(𝑥, 𝑦, 𝑧).
d) Using the Karnaugh Map & SOP minimize 𝐹(𝑥, 𝑦, 𝑧).
e) Using the Karnaugh Map & POS minimize 𝐹(𝑥, 𝑦, 𝑧).

Answer:
a) 𝐹(𝑥, 𝑦, 𝑧) = 𝑥̅ 𝑦 + 𝑦𝑧̅ + 𝑦𝑧 + 𝑥𝑦̅𝑧̅
= 𝑥̅ 𝑦 + (𝑦𝑧̅ + 𝑦𝑧̅) + 𝑦𝑧 + 𝑥𝑦̅𝑧̅ by idempotent law 𝑦𝑧̅ = 𝑦𝑧̅ + 𝑦𝑧̅
= 𝑥̅ 𝑦 + (𝑦𝑧̅ + 𝑦𝑧) + (𝑦𝑧̅ + 𝑥𝑦̅𝑧̅)
= 𝑥̅ 𝑦 + 𝑦(𝑧̅ + 𝑧) + 𝑧̅(𝑦 + 𝑥𝑦̅) by distributive law,
= 𝑥̅ 𝑦 + 𝑦. 1 + 𝑧̅(𝑥 + 𝑦)by complement law and absorption law
̅𝒚 + 𝒚 + 𝒛̅(𝒙 + 𝒚) by identity law
=𝒙
= 𝑦(𝑥̅ + 1) + 𝑧̅(𝑥 + 𝑦) by distributive law
= 𝑦. 1 + 𝑧̅(𝑥 + 𝑦) by domination law
= 𝑦 + 𝑧̅(𝑥 + 𝑦) by idempotent law
= 𝑦 + 𝑧̅𝑥 + 𝑧̅𝑦 by distributive law
= 𝑦(1 + 𝑧̅) + 𝑧̅𝑥 by commutative law

19
Unit III – Boolean algebra

= 𝑦. 1 + 𝑧̅𝑥 by domination law


= 𝑦 + 𝑧̅𝑥 by idempotent law
Hence, the simplified form of the given Boolean expression is 𝐹(𝑥, 𝑦, 𝑧) = 𝑦 + 𝑧̅𝑥 .
b)
Truth table Karnaugh map
𝑥 𝑦 𝑧 𝐹(𝑥, 𝑦, 𝑧) 𝑧
0 1
0 0 0 0 𝑥𝑦
0 0 1 0 Group 1
00 0 0
0 1 0 1
0 1 1 1 01 1 1

1 0 0 1 Group 2
11 1 1
1 0 1 0
1 1 0 1 10 1 0
1 1 1 1

c) SOP is 𝐹(𝑥, 𝑦, 𝑧) = 𝑥̅ 𝑦𝑧̅ + 𝑥̅ 𝑦𝑧 + 𝑥𝑦̅𝑧̅ + 𝑥𝑦𝑧̅ + 𝑥𝑦𝑧.


POS is 𝐹(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦 + 𝑧)(𝑥 + 𝑦 + 𝑧̅)(𝑥 + 𝑦̅ + 𝑧).
d)
Group 1 Group 2
𝑥 𝑦 𝑧 𝑥 𝑦 𝑧
0 1 0 1 1 0
0 1 1 1 0 0
1 1 0 𝑥𝑧̅
1 1 1
𝑦

Hence the minimized function is given by 𝐹(𝑥, 𝑦, 𝑧) = 𝑥𝑧̅ + 𝑦.

20
Mathematics for Computing

e) Group 1
𝑧 𝑥 𝑦 𝑧
𝑥𝑦 0 1 0 0 0
Group 1
0 0 1
00 0 0
𝑥+𝑦
01 1 1
Group 2 Group 1

11 1 1 𝑥 𝑦 𝑧
1 0 1
10 1 0 0 0 1
𝑦 + 𝑧̅

Hence the minimized function is given by 𝐹(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦)(𝑦 + 𝑧̅).


𝐹(𝑥, 𝑦, 𝑧) = (𝑥 + 𝑦)(𝑦 + 𝑧̅)
= 𝑥𝑦 + 𝑥𝑧̅ + 𝑦𝑦 + 𝑦𝑧̅ by distributive law
= 𝑥𝑦 + 𝑥𝑧̅ + 𝑦 + 𝑦𝑧̅ by idempotent law
= 𝑥𝑦 + 𝑥𝑧̅ + 𝑦(1 + 𝑧̅) by distributive law
= 𝑥𝑦 + 𝑦 + 𝑥𝑧̅ by commutative law
= (𝑥 + 1)𝑦 + 𝑥𝑧̅ by distributive law
= 1. 𝑦 + 𝑥𝑧̅ by domination law
𝐹(𝑥, 𝑦, 𝑧) = 𝑦 + 𝑥𝑧̅ + by identity law.

21
Unit III – Boolean algebra

Summary
In this session, we delved into the intricacies of minimizing Boolean functions, a pivotal
concept in digital logic design essential for streamlining logical expressions while ensuring
their integrity. We explored fundamental notions such as literals, minterms, maxterms, Sum-
of-Products (SOP), and Product-of-Sums (POS), all crucial elements in the minimization
process. Additionally, we examined two primary techniques for Boolean function
minimization: the algebraic method, which employs Boolean algebra rules to simplify
expressions, and Karnaugh maps, a graphical approach facilitating the identification of
patterns for optimization.

Objectives
After completing this session, you should be able to:
1. Recognize the fundamental concepts associated with minimizing a Boolean function,
including literals, minterms, maxterms, Sum-of-Products (SOP), and Product-of-Sums
(POS).
2. Utilize Karnaugh maps as a graphical tool to simplify a given Boolean function,
identifying patterns, and grouping adjacent terms for optimization.
3. Apply axioms and laws in Boolean algebra, such as absorption, distribution,
complementation, to systematically minimize a Boolean function.

22

You might also like