Lecture-05
Lecture-05
Karnaugh Maps
Same idea:
F = A’B + AB = B
F = A’B + AB = B
Anatomy of Karnaugh Maps
K-Map of 1-Variable
A A
0 1
m0 m1
A=0 A=1
K-Map of 2-Variables
A A B
A=0,B=0 A=1,B=0 A B
B 0 1 A 0 1
0 m0 m2 0 m0 m1
B
B 1 m1 m3 A 1 m2 m3
A=0,B=1 A=1,B=1
Anatomy of Karnaugh Maps
❑ The rules of Kmap simplification are:
➢ Groupings can contain only 1s; no 0s.
➢ Groups can be formed only at right angles; diagonal groups are not
allowed.
➢ The number of 1s in a group must be a power of 2 – even if it contains a
single 1.
➢ The groups must be made as large as possible.
➢ Groups can overlap and wrap around the sides of the Kmap.
Example
6
Anatomy of 3-Variables Karnaugh Maps
B
BC00 01 11 10
A
0 000 m0 001 m1 011 m3 010 m2
A B C F
A 1 100 m4 101 m5 111 m7 110 m6
0 0 0 m0
0 0 1 m1
C
0 1 0 m2
0 1 1 m3 OR OR
C A
1 0 0 m4 C 0 A 0
AB
1 BC 1
1 0 1 m5 00 000 m0 001 m1 m0 m4
00 000 100
1 1 0 m6 01 010 m2 011 m3 01 001 m1 101 m5
B C
1 1 1 m7 11 110 m6 111 m7 m3
11 011 111 m7
A B
10 100 m4 101 m5 m2
10 010 110
m6
7
Anatomy of 3-Variables Karnaugh Maps
Example
YZ Y
X
X Y Z F 1 m0 1 m1 1 m3 1 m2
0 0 0 1 X 1 m4 0 m5 0 m7 1 m6
0 0 1 1
0 1 0 1 Z
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 0
Anatomy of 3-Variables Karnaugh Maps
Example
YZ Y
X
1 m0 1 m1 1 m3 1 m2
X 1 m4 0 m5 0 m7 1 m6
X Y Z F
0 0 0 1 Z
• In this Kmap, we see two groups:
0 0 1 1 • Green group: In the top row. It tells us that only the value of
0 1 0 1 x is significant in that group. We see that it is complemented
in that row, so this term of the reduced function is .
0 1 1 1
• Pink group:
1 0 0 1
• This is an example of a group that wraps around the
1 0 1 0 sides of a Kmap.
1 1 0 1 • It tells us that the values of x and y are not relevant to
the term of the function that is encompassed by the
1 1 1 0 group. So, this term of the reduced function is
• So The reduced function is:
Anatomy of 4-Variables Karnaugh Maps
A B C D F A A
AB
0 0 0 0 m0 CD 00 01 11 10
0 0 0 1 m1
00 0000 m0 0100 m4 1100 m12 1000 m8
0 0 1 0 m2
01 0001 m1 0101 m5 1101 m13 1001 m9
0 0 1 1 m3 D
D
0 1 0 0 m4 11 0011 m3 0111 m7 1111 m15 1011 m11
0 1 0 1 m5 C C
10 0010 m2 0110 m6 1110 m14 1010 m10
0 1 1 0 m6
0 1 1 1 m7 B
B
1 0 0 0 m8
CD C C
1 0 0 1 m9
AB
00 01 11 10
1 0 1 0 m10
00 0000 m0 0001 m1 0011 m3 0010 m2
1 0 1 1 m11
1 1 0 0 m12 01 0100 m4 0101 m5 0111 m7 0110 m6
B B
1 1 0 1 m13 11 1100 m12 1101 m13 1111 m15 1110 m14
1 1 1 0 m14 A A
10 m8 m9 m11 m10
1 1 1 1 m15 1000 1001 1011 1010
D D 10
Anatomy of 4-Variables Karnaugh Maps
W X Y Z F Example
0 0 0 0 1
0 0 0 1 1
YZ Y Y
0 0 1 0 1
WX
0 0 1 1 0 1 1 0 1
0000 m0 0001 m1 0011 m3 0010 m2
0 1 0 0 0
0 1 0 1 0 0100 m4 0101 m5 0111 m7 0110 m6 0 0 0 1
X X
0 1 1 0 1 0 0 0 0
1100 m12 1101 m13 1111 m15 1110 m14
0 1 1 1 0 W W
1 0 0 0 1 1000 m8 1001 m9 1011 m11 1010 m10 1 1 0 1
1 0 0 1 1
Z Z
1 0 1 0 1
1 0 1 1 0 K-Map has three groups :
1 1 0 0 0 • A GREEN group entirely within the Kmap at the right.
1 1 0 1 0
• A BLUE group that wraps the top and bottom.
• A PURPLE group that spans the corners.
1 1 1 0 0
Thus we have three terms in our final function:
1 1 1 1 0
Anatomy of 4-Variables Karnaugh Maps
W X Y Z F
• It is possible to have a choice as to how to pick groups within
0 0 0 0 1 a Kmap, while keeping the groups as large as possible.
0 0 0 1 1
• The (different) functions that result from the groupings below
0 0 1 0 1
are logically equivalent.
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 1
1 0 0 1 1
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
F=Y`Z`+W`YZ+W`XZ` F=Y`Z`+W`YZ+W`XY`
1 1 1 0 0
1 1 1 1 0
Prime Implicants
z
x
y
16
Example
Express the complement f’(w,x,y,z) of the following
expression as a sum of minterms
f(w,x,y,z) = wx(y’z + yz’)
w = wxy’z + wxyz’
z
1
x
y
17
Example
y
19
Example
y
20
Example
y
21
Example
y
22
Example
If we reverse the value in each position of the Karnaugh
map of f(w,x,y,z), we obtain the Karnaugh map for
f’(w,x,y,z).
Now we can write the minimized
w form for f’(w,x,y,z) from its
Karnaugh map.
1 1 1 1
1 1 1 1
z f’(w,x,y,z) = x’ + w’ + yz + y’z’
1 1 1 0
x
1 1 0 1
y
23
Examples: Consensus Theorem
Z
Now we need to write the simplified expression
from the Karnaugh map.
XY + X’Z
25
END
of
Lecture 05
26