Professional Documents
Culture Documents
IE501
Lecture 7b
Semester 1, 2020-21
Topics Covered
This lecture will:
• Cover Karnaugh maps.
F ( x , y ) x y xy x( y y ) x
1
Semester 1, 2020-21 IE501, Lecture 7b 11
Semester 1, 2020-21 IE501, Lecture 7b 12
Example 2: Combining 2-Variable Map Cells
• Example: G(x, y) = x + y y
G y
x 0 1
0 1
0 0 1
2 3
1 1 1
x
• For G(x, y), two pairs of adjacent cells containing 1’s can
be combined using rule 6:
G (x, y ) = x y + x y + x y = x y + x y + x y + x y
( )(
Duplicate x y using = x y + x y + x y + x y = x + y
rule 5: A + A = A
)
to get: xy + xy = xy
Semester 1, 2020-21 IE501, Lecture 7b 13
Combining Cells on 2-Variable Maps
• Example: G(x, y) = x + y y
G y
x 0 1
0 1
0 0 1
2 3
1 1 1
x
• NOTE: any border contained inside a group or loop means that the
variable that changes across that border is eliminated according to rule 6.
• For the group containing minterms 2 & 3, the variable that changes
across the border is y. ⸫ the product term is simply x.
• For the group containing minterms 1 & 3, the variable that changes
across the border is x. ⸫ the product term is simply y.
• Note that if the binary value for an index differs in one bit
position, the minterms are adjacent on the K-Map
xy=01 m2 m3
• Note: If a problem provides a
K-map in a different format xy=11 m6 m7
than you are used to, simply xy=10 m4 m5
redraw it in the format you
prefer and solve the problem.
y y yz y
00 01 11 10 x 00 01 11 10
0 1 3 2
x 0 00 1 3 2
4 7 6
x 1
5
x 14 5 7 6
z z z z
Semester 1, 2020-21 IE501, Lecture 7b 18
Example Functions
•• By
convention, we represent the minterms of F by a "1" in the
map and leave the maxterms of F (the “0”s) blank. Recall: the
maxterms of F = minterms of = the “0”s.
• Example: yz y
F(x, y, z) m(2,3,4,5) x 00 01 11 10
0 1 3 2
0 1 1
4 5 7 6
x1 1 1
• Example:
G(x, y, z) m(3,4,6,7) z
• NOTE: Learn the locations of the yz y
x 00 01 11 10
8 indices based on the variable 0 1 3 2
order shown (x, most significant 0 1
and z, least significant) on the x1 41 5 7
1
6
1
map boundaries
Semester 1, 2020-21 IE501, Lecture 7b
z 19
Semester 1, 2020-21 IE501, Lecture 7b 22
Semester 1, 2020-21 IE501, Lecture 7b 23
Semester 1, 2020-21 IE501, Lecture 7b 24
Combining Cells on 3-variable Maps
• By combining cells, we reduce number of literals in a
product term
• On a 3-variable K-Map:
– One cell represents a minterm with three variables
– Two adjacent cells represent a simplified product term
with two variables
– Four “adjacent” cells represent a simplified product
term with one variable
– Eight “adjacent” cells is the function of all ones (no
variables) = 1.
y
0 1 3 2
x 4 5 7 6
4 5 7 6
x1
z
• Read off the product terms for the groups shown
Semester 1, 2020-21 IE501, Lecture 7b 29
Three-Variable Maps
• Example Shapes of 4-cell Groups:
00 01 11
y 10
0 1 3 2
0
4 5 7 6
x1
z
00 01 11 10
0 1 1 1
x 1 1 1
z
F(x, y, z) = z + x y
Semester 1, 2020-21 IE501, Lecture 7b 32
Another Example: 3-Variable Map Simplification
• Use a K-map to find an optimum SOP equation
for F(X, Y, Z) m(0,1,2,4,6,7)
Credit: http://www.learnabout-electronics.org/Digital/dig24.php
Image location: http://www.learnabout-electronics.org/Digital/images/Karnaugh-groups-1.jpg
Semester 1, 2020-21 IE501, Lecture 7b 36
Four-Variable Maps
• This top-bottom AND side-side wrap around turns the
4-variable K-map into a torus or doughnut. This makes
the 4 corners adjacent to each other:
Torus (doughnut shape) K-map
"Karnaugh6" by Jochen Burghardt - Own work. Licensed under CC BY-SA 3.0 via Commons -
https://commons.wikimedia.org/wiki/File:Karnaugh6.gif#/media/File:Karnaugh6.gif
Semester 1, 2020-21 IE501, Lecture 7b 37
Four-Variable Maps
• Example Shapes of Groups:
YZ Y
WX 00 01 11 10
0 1 3 2
00
4 5 7 6
01
X
12 13 15 14
11
W
8 9 11 10
10
Z
Semester 1, 2020-21 IE501, Lecture 7b 39
Four-Variable Map Simplification
Simplify:
YZ Y
WX 00 01 11 10
0 1 3 2
00
4 5 7 6
01
X
12 13 15 14
11
W
8 9 11 10
10
Z
Semester 1, 2020-21 IE501, Lecture 7b 40
Four-Variable Map Simplification
• Simplify:
F(A, B, C, D) m(0,2,3,8,9,10,11,12, 13,14,15)
CD C
00 01 11 10
AB
00
01
B
11
A
10
D
Semester 1, 2020-21 IE501, Lecture 7b 41
Selection Example with Multiple Possible Loops
• One approach is to find ALL loops first.
• Next, select the “essential” loops that cover 1s that no other loops can cover
• Then choose the minimum number of remaining loops that still cover all 1s,
and remove the redundant loops.
BD
CD
CD C CD C
00 01 11 10 00 01 11 10
AB BD AB
00 1 1 1 00
BD 01 1 1 BD 01
B B
11 1 1 11
A A
10 1 1 1 1 10
AB
D D
AD Minterms covered by single loop
Semester 1, 2020-21 BC IE501, Lecture 7b 42
Selection Example with Multiple Possible Loops
• Another example: Simplify F(A, B, C, D) given on the
K-map.
Selected Essential
C C
1 1 1 1
1 1 1 1 1 1 1 1
B B
1 1
A A
1 1 1 1
D D
01
B
11
A
10
D
Semester 1, 2020-21 IE501, Lecture 7b 45
Don't Cares in K-Maps
• Sometimes a K-map contains entries where:
– the input values for the minterm will never occur, or
– The output value for the minterm will not be used
• In these cases, the output value need not be defined
• Instead, the output value is defined as a “don't care”
• By placing “don't cares” (as “X” entries) in the K-map, the logic circuit may
simplified further.
• Because we “don’t care”, each don’t care “X” entry may be treated as either
a 1 or 0 value on the resulting map and either included or excluded from the
loops, depending on what is needed to create the biggest loops. Recall: the
bigger the loop the more variables eliminated, & the simpler the solution.
• For example, an “X” may take on value “0” in an SOP solution and value
“1” in a POS solution, or vice-versa.
• Any minterm with value “X” does not need to be covered by a loop.
1 x 1 x
1 x x 1 1 x x 1
B B
x x
A A
1 1 x 1 1 x
D D
yz y
wx 00 01 11 10
00 00 01 03 02 F1(w,x,y,z) = w + x z + x y
01 04 15 17 16 Don’t cares are treated as “1s” (i.e. X
x
1).
w
11 X12 X13 X15 X14 F2(w, x, y, z) = w x z + w x y + w x y
10 1 8 1 9 X11 X10 For F2 the don't cares are treated as “0s”
z (i.e. X 0), & not included in loops.
F1 is much simpler than F2 where the “don't cares” are not used
Semester 1, 2020-21 IE501, Lecture 7b 50
Product of Sums (POS) K-Maps
𝒁 𝒁 𝒁
Semester 1, 2020-21 IE501, Lecture 7b 53
Product of Sums Example
Find the optimum POS solution for:
𝐹 ( 𝑊 , 𝑋 , 𝑌 , 𝑍 ) =∏ (0 , 2 ,5 , 7 , 8 ,10)∙ ∏ (1 , 4 ,6)
𝑀 𝐷
YZ 𝒀 𝒀
WX 00 01 11 10
0 1 3 2
𝑿
00
𝑾
4 5 7 6
01
𝑿
12 13 15 14
11
𝑾
8 9 11 10
10 𝑿
𝒁 𝒁 𝒁
Semester 1, 2020-21 IE501, Lecture 7b 54
Product of Sums Example
• Find the optimum POS solution for:
F(A,B,C,D) m (3,9,11,12 ,13,14,15)
d
(1,4,6)