Simplification and Minimization of Boolean Functions
Simplification and Minimization of Boolean Functions
1
Topics to be covered
Introduction
Karnaugh map representation of logical functions
Simplification of logical functions using K-maps.
Minimization of Boolean functions specified in minterms/
Maxterms or truth table
Don't-care Combinations
EX-OR and EX-NOR simplification of k-maps
The tabulation method of minimization
2
Introduction
Since there is no a set of rules for minimizing a Boolean function
using identities, sometimes it is difficult to know whether the
minimum expression is obtained.
We have seen in the preceding chapter about simplification using
Boolean algebraic laws and theorems. But, in general the following
methods can be used to simplify the Boolean function.
1. Algebraic method
2. Karnaugh map technique(mapping method)
3. Variable entered map(VEM) technique
4. Quine-MCClusky method(Tabular method)
We have introduced the algebraic method of simplification using Boolean
algebraic theorems.
In this chapter, we will discuss about the simplification of logic functions using
Karnaugh map method Quine-MCClusky method.
The Karnaugh map or simply K-map is the simple and most commonly used
method. It can be used up to six variables. The VEM technique is beyond the scope
of this course.
K-map representation of logic functions
The above figure shows the K-maps for two, three and four variables.
In an n-variable K-map there are 2n cells.
Each cell corresponds to one of the combinations of n-variables. Therefore we see
that for each row of the truth table, for each minterm and for each maxterm, there
is n specific cell in the K-map.
In each map the variables are indicated to identify the cells.
Gray code has been used for the identification of cells. The reason for using Gray
code will become clear when we discuss the application of K-map.
You can verify the decimal number corresponding to each cell which is written in
the bottom right corner of the cell.
Two-variable K-Map
MSB x
y
0 1
0 m0 m2
x y minterms
Row #
1 m1 m3
0 0 m0
0
0 1 m1
1 LSB y
1 0 m2 x
2 0 1
1 1 m3
3 0 m0 m1
6
Three-variable K-Map
0 1 1 m3 1 m1 m3 m7 m5
3
1 0 0 m4 y z
4
1 0 1 m5 x (b) Karnaugh map
5
1 1 0 m6
6
1 1 1 m7
7
(a) Truth table
7
Four-variable K-Map
Gray code x 1
x1 x2
x3 x4
00 01 11 10
00 m0 m4 m 12 m8
Gray code
01 m1 m5 m 13 m9
x4
11 m3 m7 m 15 m 11
x3
10 m2 m6 m 14 m 10
x2
8
Four-variable K-Map
𝑥3 𝑥4
𝑥1 𝑥2
9
Representation of truth table on K-map
Consider the truth table of 3-variable logic function given below:
Y = 𝑥1 𝑥2 𝑥3 + 𝑥1 𝑥2 𝑥3 + 𝑥1 𝑥2 𝑥3 + 𝑥1 𝑥2 𝑥3
Row No. Inputs Outputs
𝑥1 𝑥2 𝑥3 Y
0 0 0 0 1
1 0 0 1 1
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1 K-map for the above figure
5 1 0 1 0
6 1 1 0 0
7 1 1 1 0
table represents the complete truth table in SOP form
On the other hand, if a K-map is given we can make a truth table
corresponding to this by reverse process, i.e. output Y is logic "1"
corresponding to minterms represented by cells with entries 1. In the
all remaining rows the output is logic "0".
Example: prepare a truth table for the following K-map.
Solution:
Inputs Output
Row No. 𝑥1 𝑥2 𝑥3 𝑥4 Y
0 0 0 0 0 1
1 0 0 0 1 0
2 0 0 1 0 1
Representation of standard SOP form on K-map
A logical function in standard SOP form can be represented on a K-
map simply by entering 1’s in the cells of the K-map corresponding
to each minterms present in the function.
Example: represent the following equation on K-map.
Y = 𝑥1 𝑥2 𝑥3 + 𝑥1 𝑥2 𝑥3 + 𝑥1 𝑥2 𝑥3 + 𝑥1 𝑥2 𝑥3
Solution:…………..?
14
Example:
Solution:
B. Grouping four adjacent one’s
Four cells form a group of four adjacent one’s, if two of the literals
associated with the minterms or maxterms are not the same.
16
Example: simplify the following K-map
Solution:
C. Grouping eight adjacent one’s
Eight cells form a group of eight adjacent one’s, if three of the
literals associated with the minterms/maxterms are not the same and
the other literals are the same.
19
D. Grouping 2, 4, and 8 adjacent zero’s
In the above discussion, we have considered groups of 2, 4, and 8
adjacent one’s. Instead of making the groups of one’s, we can also
make groups of zero’s. the procedure is similar to the one used
above.
Example:
1. Given the following Boolean function
𝐹 = 𝐴′ 𝐶 + 𝐴′ 𝐵 + 𝐴𝐵′ 𝐶 + 𝐵𝐶
a. Express it in sum of minterms
b. Find the minimal sum of products expression
2. Minimize the following expression using K-map
𝐹 𝑥1 , 𝑥2 , 𝑥3 = 𝑚(2,4,5,6,7)
22
Minimization using K-Maps
23
Two-variable K-Map
Example:
Using a Karnaugh Map, minimize the logic function
described by the following Truth table.
# A B F
0 0 0 1
1 0 1 1
2 1 0 0
3 1 1 1
24
Three-variable K-Map
Example:
Using a Karnaugh Map, minimize the logic function
described by the following Truth table.
# A B C F
0 0 0 0 0
1 0 0 1 1
2 0 1 0 0
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
25
Minimization using K-Maps
Exercise:
Given the following Truth table,
1. Derive the Boolean Expression
2. Use a K-Map to determine the minimized Boolean Expression
# A B C F
0 0 0 0 1
1 0 0 1 0
2 0 1 0 1
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
26
Four-variable K-Map
# A B C D F
0 0 0 0 0 0
Example: 1 0 0 0 1 0
Using a Karnaugh Map, 2 0 0 1 0 1
minimize the logic function 3 0 0 1 1 1
4 0 1 0 0 0
described by the following
5 0 1 0 1 0
Truth table. 6 0 1 1 0 0
7 0 1 1 1 0
8 1 0 0 0 0
9 1 0 0 1 1
10 1 0 1 0 1
11 1 0 1 1 1
12 1 1 0 0 0
13 1 1 0 1 1
14 1 1 1 0 0
15 1 1 1 1 0
27
Four-variable K-Map
# A B C D F
0 0 0 0 0 0
1 0 0 0 1 0
Example: 2 0 0 1 0 1
Using a Karnaugh Map, 3 0 0 1 1 1
minimize the logic function 4 0 1 0 0 0
28
Four-variable K-Map
# A B C D F
0 0 0 0 0 1
1 0 0 0 1 0
Exercise: 2 0 0 1 0 1
3 0 0 1 1 1
Given the following Truth table,
4 0 1 0 0 0
1. Derive the Boolean Expression 5 0 1 0 1 0
2. Use a K-Map to determine the 6 0 1 1 0 1
minimized Boolean Expression 7 0 1 1 1 1
8 1 0 0 0 1
9 1 0 0 1 0
10 1 0 1 0 1
11 1 0 1 1 0
12 1 1 0 0 0
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 1
29
Minimization using K-Maps
(Deriving a POS Expression using the Maxterms)
30
Minimization using K-maps
Enter Maxterms (for POS) into K-map
Identify adjacent cells
– Maxterms differ in only one bit
Use adjacency to minimize logic function
– Gray code used for enumeration
• Specifies the location of each Maxterm in K-map
– Horizontal and Vertical adjacency
• Both are logically adjacent
– K-map wraps
• Left and right columns are logically adjacent
• Top and bottom rows are logically adjacent
31
Three-variable K-Map
Example:
Using a K-Map, minimize the logic function described by
the following Truth table.
# A B C F
0 0 0 0 0
1 0 0 1 1
2 0 1 0 0
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
32
Four-variable K-Map
# A B C D F
0 0 0 0 0 0
1 0 0 0 1 0
2 0 0 1 0 1
Example: 3 0 0 1 1 1
4 0 1 0 0 0
Using a K-Map, minimize the
5 0 1 0 1 0
logic function described by
6 0 1 1 0 1
the following Truth table.
7 0 1 1 1 1
8 1 0 0 0 0
9 1 0 0 1 1
10 1 0 1 0 1
11 1 0 1 1 1
12 1 1 0 0 0
13 1 1 0 1 1
14 1 1 1 0 1
15 1 1 1 1 1
33
Minimizing SOP Expressions
# A B C F
0 0 0 0 0
1 0 0 1 1
2 0 1 0 1
corresponds to the row #s
3 0 1 1 0
4 1 0 0 0
5 1 0 1 1 F = S m(1, 2, 5, 7)
6 1 1 0 0 Shorter-hand Notation
7 1 1 1 1
34
Minimizing SOP Expressions
Exercise:
Given the following Canonical SOP expression:
F(A,B,C) = S m(0, 2, 3, 6)
35
Minimizing SOP Expressions
Exercise: Given the following Canonical SOP expression,
F(A,B,C) = S m(1, 4, 5, 6, 7)
36
Minimizing POS Expressions
# A B C F
0 0 0 0 0
1 0 0 1 1
2 0 1 0 1
corresponds to the row #s
3 0 1 1 0
4 1 0 0 0
5 1 0 1 1 F = P M(0, 3, 4, 6)
6 1 1 0 0 Shorter-hand Notation
7 1 1 1 1
37
Minimizing POS Expressions
Exercise:
Given the following Canonical POS expression:
F(A,B,C) = P M(4, 5, 6)
1. Write out the expression in terms of the minterms.
2. Minimize the POS expression using a K-Map
Exercise:
Given the following Canonical POS expression:
F(A,B,C) = P M(1, 2, 3, 5)
Exercise:
Given the following Canonical POS expression:
39
Minimizing Boolean Expressions using
K-maps for
Incompletely Specified Functions
40
Incompletely Specified Functions
If the function is specified in one of the two standard forms, its
K-map can be prepared and the function can be minimized.
Now we consider the cases where the functions are not specified
in standard forms.
In such cases, the equations can be converted into standard
forms, the K-map obtained and minimized. Alternately, we can
directly prepare K-map using the following algorithm:
1. Enter ones for minterms and zeros for maxterms.
2. Enter a pair of ones/zeros for each of the terms
with one variable less than the total number of
variables.
3. Enter four adjacent ones/zeros for terms with two
variables less than the total number of variables.
4. Repeat for other terms in the similar way.
Once the K-map is prepared the minimization procedure is
same as discussed earlier.
Incompletely Specified Functions
Example :Minimize the following four variable logic function
𝑓 𝐴, 𝐵, 𝐶, 𝐷 = 𝐴𝐵𝐶 ′ 𝐷 + 𝐴′ 𝐵𝐶𝐷 + 𝐴′ 𝐵′ 𝐶 ′ + 𝐴′ 𝐵′ 𝐷′ + 𝐴𝐶 ′ + 𝐵′
45
Don’t Care Conditions
Example :Minimize the following four variable logic function
𝑓 𝐴, 𝐵, 𝐶, 𝐷 = 𝑚 1, 3, 7, 11, 15 + 𝑑(0, 2, 5)
Solution:
47
EX-OR and EX-NOR simplification of k-maps
XOR & XNOR Patterns on the Map.
Inspect the K-map to detect XOR/XNOR patterns:
1. kitty-corner (diagonal) adjacencies;
2. offset adjacencies.
49
Cont’d
50