Professional Documents
Culture Documents
Objectives
This section presents a technique for simplifying logical
expressions. It will:
Define Karnaugh and establish the correspondence between
Karnaugh maps and truth tables and logical expressions.
Show how to use Karnaugh maps to derive minimal sum-
of-products and product-of-sums expressions.
Introduce the concept of "don't care" entries and show how
to extend Karnaugh map techniques to include maps with
don't care entries.
Reading Assignment
Sections 2.6 and 2.7 from the text
1
A B C D Z
0 0 0 0 0
0 0 0 1 0 Z A,B
0 0 1 0 0 Z A C,D 00 01 11 10
0 0 1 1 1
0 1 0 0 0 0 0 1 0 00 0 0 1 0
0 1 0 1 1
0 1 1 0 1 0 1 1 1 01 0 1 1 1
D
0 1 1 1 1 1 1 1 1 11 1 1 1 1
1 0 0 0 0 C
1 0 0 1 1 0 1 1 1 10 0 1 1 1
1 0 1 0 1
1 0 1 1 1 B
1 1 0 0 1 Type 1 Map Type 2 Map
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1 Four-Variable Maps
Truth Table
D D D D
C C C C
B B B B
A=1 B=1 C=1 D=1
region region region region
2
Exercise: Plot the following expression on a Karnaugh map.
Z = (A•B)⊕(C+D)
1 0 1 0
Z = A•B•(C+D)' + (A•B)'•(C+D) B
= A•B•C'•D' + (A'+B')•(C+D) 0 0 1 1
D
= A•B•C'•D' + A'•C + A'•D + B'•C + B'•D
1 1 1 1
0 1 1 0
C
3
Merging Adjacent Product Terms
Z = m5 + m13
Z A = A'•B•C'•D + A•B•C'•D
0 0 0 0 = (A'+A)•B•C'•D
0 1 1 0 = 1•B•C'•D
D
0 0 0 0 = B•C'•D
C
0 0 0 0
A'
B B
C'
D B
Z C' Z
A D
B
C'
D
Example
A • B • C'
Z A
0 0 1 0
A' • C • D
0 0 1 0
D
1 1 0 0
C
0 0 0 0
Z= m5 + m7 + m13 + m15
= A'•B•C'•D + A'•B•C•D + A•B•C'•D + A•B•C•D
= (A'•C' + A'•C + A•C' + A•C) • (B•D)
= (A'•(C' + C) + A•(C' + C)) • (B•D)
= (A' + A) • (B•D)
= B•D
4
Basic Karnaugh Map Groupings for Three-Variable
Maps.
Z1 Z3 Z5
A A A
1 1
1 1 1
C C C
1
B B B
1 1
Z2 Z4 Z6
A A A
1 1
1 1 1
C C C
1 1 1
B B B
1 1
Z7 Z8 Z9 Z10
A A A A
1
1 1 1 1 1
D D D D
1
C C C C
1
B B B B
B B B B
5
Z15 Z16 Z17
A A A
1 1 1
1 1 1 1 1 1 1
D D D
1 1 1
C C C
1 1 1
B B B
B B B
6
Invalid Karnaugh Map Groupings.
Z A loop 1
Z A
0 1 0 0 loop 2
1 0 0 1
0 1 1 0
D 1 1 0 1
D
1 1 1 0 1 1 1 1
C
0 1 1 0 C
0 1 1 1
B
B
Violates Rule 1 Violates Rule 2
7
Z #3 A #2 Z #3 A #2 Z #3 A #2
1 1 0 1 1 1 0 1 1 1 0 1
#4 0 1 1 1 #4 0 1 1 1 0 1 1 1
D D D
1 1 1 0 1 1 1 0 1 1 1 0
C C C
1 0 0 0 1 0 0 0 1 0 0 0
#1 #1 #1
#5 #5 #4
B B B
a. Non-minimal b. Non-minimal Selection c. Minimal
Product Terms of Prime Implicants Grouping
a. Z = A•B•D+A•B'•C'+A'•B•C'+A'•C•D+A'•B'•D'
b. Z = B•D+A•B'•C'+A'•B•C'+A'•C•D+A'•B'•D'
c. Z = B•D+A•B'•C'+A'•C'•D'+A'•B'•C
W3 W3
A A
1 0 1 1 1 0 1 1
1 1 1 1 1 1 1 1
D D
0 1 1 0 0 1 1 0
C C
1 1 1 0 1 1 1 0
B B
a. W3 = C'D+AC'+BC+A'B'D'
b. W3 = BD+AB+B'C'+A'CD'
1 1 1 0 1 1 1 0
B
1 1 0 0 1 1 0 0
D D
0 0 1 0 0 0 1 0
C
0 0 1 1 0 0 1 1
C B
8
Minimal Product-Of-Sums Expressions
Merging Adjacent Product Terms.
Z A
A'
1 1
B'
1 1 C'
C Z B' Z
0 0 A C'
B B'
1 1
C'
M3•M7 = (A+B'+C')•(A'+B'+C')
= (A•A')+(B'+C')
= 0 + (B'+C')
= B' + C'
9
Examples:
Z B'+C+D A
A+D' 1 0 0 1
0 0 1 1
D
0 0 1 1
C
1 1 1 0
B A'+B+C'+D
Z = (A+D')•(B'+C+D)•(A'+B+C'+D)
Z1 Z2
A A
1 0 1 1 1 0 1 1
0 1 1 0 0 0 0 0
D D
0 1 1 1 0 0 0 0
C C
1 0 1 1 1 0 0 1
B B
Z1 = (A+B'+D)•(B+C+D')•(A+B+D')
Z2 = D'•(A+B')•(B'+C')
B B
Z1 = (A+B')•(A+D')•(B'+D')•(A'+B+C)
Z1 = (A•B•D') + (A•B'•C) + (A'•B'•D')
10
Exercise: Derive minimal SOP and POS expressions
from the following Karnaugh maps.
X X
A A
1 1 1 1 1 1 1 1
B
1 0 0 1 1 0 0 1
D D
1 0 0 0 1 0 0 0
C
1 1 0 0 1 1 0 0
C B
1 1 1 1 1 1 1 1
d 1 1 1 0 1 1 1
C C C C
d 0 1 0 0 0 0 0
B B B B
0 0 0 0 0 0 0 0
Z A Z A
0 0 d 1
1 d d 1
0 0 d 0
D 0 0 d 0
D
0 1 d d
C 1 1 0 d
C
0 1 d d
1 d d 1
B
B
11
Minterm and Maxterm Lists with Don't Care Entries.
ΣA,B,C(6,7,8,d10,d11,d12,d13,d14,d15)
ΠA,B,C(0,1,2,3,4,5,9,d10,d11,d12,d13,d14,d15)
B
0 4 12 8
1 5 13 9 Z
E B B
D 3 7 15 11
0 4 12 8 16 20 28 24
2 6 14 10
C 1 5 13 9 17 21 29 25
B E E
3 7 15 11 19 23 31 27
16 20 28 24 D D
2 6 14 10 18 22 30 26
17 21 29 25
E A C C
D 19 23 31 27
18 22 30 26 A
C
Five-Variable Map Structure Alternate Version of Five-Variable Map
12
Six-Variable Maps
C
0 12 8 4
1 5 13 9
F Z
E 3 7 15 11 C C
2 6 14 10 0 4 12 8 16 20 28 24
D 1 5 13 9 17 21 29 25
C F F
16 20 28 24 3 7 15 11 19 23 31 27
E E
17 21 29 25 2 6 14 10 18 22 30 26
F
E 19 23 31 27 D
D
18 22 30 26 C C
D 32 36 44 40 48 52 60 56
C
48 52 60 56 33 37 45 41 49 53 61 57
F F A
B 49 53 61 57 35 39 47 43 51 55 63 59
F E E
E 51 55 63 59 A 34 38 46 42 50 54 62 58
50 54 62 58 D D
D B
C
Alternate Version of Six-Variable Map
32 36 44 40
33 37 45 41
F
E 35 39 47 43
34 38 46 42
D
Six Variable Map Structure
Examples.
Z B B
1 0 0 0 1 0 0 0
B' •C' • E' 0 0 1 1 0 0 1 1
E
0 0 1 1 0 0 1 1
D
1 0 0 0 1 0 0 0 B•E
C C
A
Z = B'•C'•E'+B•E
Z B B
0 0 1 1 0 0 1 1
0 1 1 0 0 1 1 0
E
1 1 1 0 0 1 1 1
D
1 1 0 0 0 0 1 1
C C
A
13
Z B B
0 0 1 0 0 0 0 0
0 1 1 1 0 1 1 1
E
0 1 1 1 0 1 1 1
D
0 0 1 0 0 0 1 1
C C
A
Z = (B+C)•(B+E•(A'+D+E)•(A+C+E)
Z B B
0 d 1 0 d d d d
0 d 1 0 0 0 1 0
E
d d 1 1 d d d d
D
d d 1 1 1 1 1 1
C C
A
Z = B•C + D
Timing Hazards
Exercise: Draw a timing diagram for the following
circuit assuming an equal unit delay for each gate.
A X
Y
B
14
Static 1 hazards
A=1 P
S
NS Z
Q
B=1
S
P
NS
Q
Z
0 spike, static 1 hazard
S 0 0 1 1
The hazard occurs when the output is 1 before and after the
transition.
It happens because one of the AND gates is holding the
output 1 before the transition and the other AND gate holds
it 1 after the transition. The spike occurs if it is possible for
the first to turn off before the second turns on.
This can happen anytime there are to adjacent squares on
the Karnaugh map that are both 1 and not both covered by
a common loop. The hazard occurs in making a transition
from one square to the other.
The way to prevent it is to put in an extra product term that
is 1 on both sides of the transition. On the Karnaugh map
this is a loop covering the two adjacent one squares.
Elec 326 30 Karnaugh Maps
15
The loop added to prevent the hazard is redundant and not
needed to realize the logical expression. Its only purpose is
to prevent the hazard.
A
S
Z
B
Static 0 hazard
S
A=0 P P
S
Z NS
Q
B=0 Q 1 spike, static 0 hazard
Z A A
S
0 0 1 1
Z
B
S 0 1 1 0
16
Hazards can frequently be ignored. If the signal Z
above is not used during the transition, then we don't
care if it has a spike.
When a signal is used as the input to a flip-flop, it is
only sampled with the clock makes a transition.
Therefore, if we can make sure that any spikes occur
at some other time, they will not be a problem.
17