EC4010Digital Design - Gate-Level Minimization L3
EC4010Digital Design - Gate-Level Minimization L3
(a) (b)
Two variable K-Map
x (b)
(a)
Three variable K-Map
• There are eight minterms for three variables.
• The minterms are arranged not in binary sequences
but in a sequence similar to Gray code.
• For example, the square assigned to m6
corresponds to row 1 and column 10.
Four variable K-Map
• There are 16 minterms for four variables.
K-map rules
Simplify Boolean functions
𝐹 𝑥, 𝑦, 𝑧 = ' (3,4,6,7)
𝐹 𝑥, 𝑦, 𝑧 = ∑ (3,4,6,7) = yz + xz’
Exercises.
𝐹 𝐴, 𝐵, 𝐶 = ∑ (1,2,3,5,7) = C + A’B
Exercises.
Simplify the Boolean expression, given below using K
– Map.
𝐹 𝑥, 𝑦, 𝑧 = ( (0,2,4,5,6)
F = z’ + xy’
Exercises.
a) 𝐹 𝑤, 𝑥, 𝑦, 𝑧 = 𝑦! + 𝑤 ! 𝑧 ! + 𝑥𝑧!
Exercises.
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = 𝐴 ! 𝐵 ! 𝐶 ! + 𝐵 ! 𝐶𝐷 ! + 𝐴!𝐵𝐶𝐷! + 𝐴𝐵 ! 𝐶 ! = 𝐵 ! 𝐷 ! + 𝐵 ! 𝐶 ! + 𝐴!𝐶𝐷′
Product of sums simplification in K-
Maps
1. Simplify the following Boolean expression into
a) sum of products form
b) product of sums form
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = ; 𝑚 0, 1, 2, 5, 8, 9, 10
A B C D Y A B C D Y
0 0 0 0 0 1 0 0 0 1
0 0 0 1 0 1 0 0 1 1
0 0 1 0 0 1 0 1 0 X
0 0 1 1 0 1 0 1 1 X
0 1 0 0 0 1 1 0 0 X
0 1 0 1 0 1 1 0 1 X
0 1 1 0 0 1 1 1 0 X
0 1 1 1 1 1 1 1 1 X
Don’t care terms in K-map.
m3 0 0 1 1 m8 - m9
2 m3 - m7
m9 1 0 0 1
2 m3 - m11
m7 0 1 1 1
3 m7 - m11
m11 1 0 1 1
m9 - m15
4 m15 1 1 1 1 3
m11 - m15
Quine–McCluskey
algorithm-Tabular method
• K-Map & Boolean algebra become difficult to optimise
• When variable is > 6
• Example
• Minimize the following function using Quine-McCluskey method.
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = ; 𝑚 0,1,3,7,8,9,11,15
A B C D
m0 0 0 0 0
Quine–McCluskey algorithm m1 0 0 0 1
m3 0 0 1 1
m7 0 1 1 1
• 𝐹 𝐴, 𝐵, 𝐶, 𝐷 = ∑ 𝑚 0,1,3,7,8,9,11,15 m8 1 0 0 0
m9 1 0 0 1
m11 1 0 1 1
• Group minterms according to number of 1’s in their
m15 1 1 1 1
binary representations.
Group Minterm Binary Group Matched Binary representation
representation Pairs
A B C D
A B C D
m0 - m1 0 0 0 _
0 m0 0 0 0 0 ✔ 0
m0 - m8 _ 0 0 0
m1 0 0 0 1 ✔ m1 - m3 0 0 _ 1
1
m8 1 0 0 0 ✔ 1 m1 - m9 _ 0 0 1
m3 0 0 1 1 ✔ m8 - m9 1 0 0 _
2 m3 - m7 0 _ 1 1
m9 1 0 0 1 ✔
2 m3 - m11 _ 0 1 1
m7 0 1 1 1 ✔
3 m7 - m11 1 0 _ 1
m11 1 0 1 1 ✔
m9 - m15 _ 1 1 1
4 m15 1 1 1 1 ✔ 3
m11 - m15 1 _ 1 1
A B C D
m0 0 0 0 0
Quine–McCluskey algorithm m1 0 0 0 1
m3 0 0 1 1
m7 0 1 1 1
• 𝐹 𝐴, 𝐵, 𝐶, 𝐷 = ∑ 𝑚 0,1,3,7,8,9,11,15 m8 1 0 0 0
m9 1 0 0 1
m11 1 0 1 1
m15 1 1 1 1
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = 𝐵 ! 𝐶 ! + 𝐶𝐷
A B C D
m0 0 0 0 0
Quine–McCluskey algorithm m1 0 0 0 1
m3 0 0 1 1
m7 0 1 1 1
• 𝐹 𝐴, 𝐵, 𝐶, 𝐷 = ∑ 𝑚 0,1,3,7,8,9,11,15 m8 1 0 0 0
m9 1 0 0 1
m11 1 0 1 1
m15 1 1 1 1
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = 𝐵 ! 𝐶 ! + 𝐶𝐷
Exercise
Minimize the following function using Quine McCulskey method.
𝐹 𝐴, 𝐵, 𝐶, 𝐷 = 𝑚 2,4,10,12, 14 + 𝑑(0,1,5,8)
Universal logic gates
NAND and NOR gates are said to be as universal logic gates, as
these gates can be used to construct any other logic gates.
e.g.
• The NAND gate is said to be a universal gate because any logic circuit
can be implemented with it.
Exercise