Download presentation
Presentation is loading. Please wait.
1
Instructor: Alexander Stoytchev
CprE 281: Digital Logic Instructor: Alexander Stoytchev
2
Karnaugh Maps CprE 281: Digital Logic Iowa State University, Ames, IA
Copyright © Alexander Stoytchev
3
Administrative Stuff HW4 is out It is due on Monday Sep 17 @ 4 pm
It is posted on the class web page I also sent you an with the link.
4
Administrative Stuff Sample homework solutions are posted on Canvas
Look under ‘Files’
5
Quick Review
6
Do You Still Remember This Boolean Algebra Theorem?
7
Let’s prove 14.a
8
Let’s prove 14.a 1
9
Let’s prove 14.a 1 1
10
Let’s prove 14.a 1 1 1
11
Let’s prove 14.a 1 1 1 1
12
Let’s prove 14.a 1 1 1 1 They are equal.
14
Motivation An approach for simplifying logic expressions. How do we guarantee we have reached the minimum SOP/POS representation?
15
Two-Variable K-Map
16
Karnaugh Map (K-map) View the function in a visual form
Same information as truth table Easier to group minterms x x 1 2 x 1 x 2 m 1 1 m m m 1 2 1 m 2 1 m m 1 3 1 1 m 3 (a) Truth table (b) Karnaugh map [ Figure 2.49 from the textbook ]
17
Minterms x x x x m m m m m 1 1 m 1 1 1 m 1 1 1 1 m 1 1 1 1 2 1 2 1 2 3
1 2 3 m 1 1 m 1 1 1 1 m 1 1 2 1 1 m 1 1 1 3
18
Minterm Example x x x x m m m m m + m 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 1 2 m m m m m + m 1 2 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
19
Minterm Example _ x1x2 + x1x2 = x2 x x x x m m m m m + m 1 1 1 1 1 1 1
1 2 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 _ x1x2 + x1x2 = x2
20
Grouping Example x 1 x 1 x 2 x 2 1 1 1 1 1 1 m0 m1
21
Grouping Example + = m0 + m1 = m0 + m1 x x x x x x 1 1 1 1 1 1 1 1 1 1
2 x 2 x 2 1 1 1 1 1 + = 1 1 1 1 1 m0 + m1 = m0 + m1
22
Grouping Example + = m0 + m1 = m0 + m1 x x x x x x 1 1 1 1 1 1 1 1 1 1
2 x 2 x 2 1 1 1 1 1 + = 1 1 1 1 1 m0 + m1 = m0 + m1
23
Grouping Example + = m0 + m1 = m0 + m1 _ _ _ _ + =
2 x 2 x 2 1 1 1 1 1 + = 1 1 1 1 1 m0 + m1 = m0 + m1 _ _ _ _ x1x2 + x1x2 = x1 Property 14a (Combining)
24
Grouping Rules Group “1”s with rectangles Both sides a power of 2:
1x1, 1x2, 2x1, 2x2, 1x4, 4x1, 2x4, 4x2, 4x4 Can use the same minterm more than once Can wrap around the edges of the map Some rules in selecting groups: Try to use as few groups as possible to cover all “1”s. For each group, try to make it as large as you can (i.e., if you can use a 2x2, don’t use a 2x1 even if that is enough).
25
Two-Variable K-map (a) Truth table (b) Karnaugh map x x x x m 1 1 m m
2 x 1 x 2 m 1 1 m m m 1 2 1 m 2 1 m m 1 3 1 1 m 3 (a) Truth table (b) Karnaugh map [ Figure 2.49 from the textbook ]
26
Step-By-Step Example x x 1 2 1 1 1 1 1 1 1
27
1. Draw The Map x x 1 2 x 1 x 2 1 1 1 1 1 1 1 1 1
28
2. Fill The Map x x 1 2 x 1 x 2 m 1 3 2 1 1 1 1 m m 2 1 1 m m 1 3 1 1 1
29
2. Fill The Map x x 1 2 x 1 x 2 m 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1
30
3. Group x x 1 2 x 1 x 2 m 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1
31
3. Group x x 1 2 x 1 x 2 m 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1
32
3. Group x x 1 2 x 1 x 2 m 1 3 2 1 1 1 1 1 1 1 1 1 1 1 1
33
4. Write The Expression x x 1 2 x 1 x 2 1 1 1 1 1 1 1 1 1 1 1 1
34
4. Write The Expression _ x1 + x2 x x x x 1 1 1 1 1 1 1 1 1 1 1 1 1 2
1 1 1 1 1 1 1 1 1 1 1 1 _ x1 + x2
35
Writing The Expression
Find which variable is constant x 1 x 2 _ 1 x1 is constant 1 1 1
36
Writing The Expression
Find which variable is constant x 1 x 2 1 x1 is constant 1 1 1
38
These are all valid groupings
39
These are also valid But try to use larger rectangles if possible.
40
This one is valid too In this case the result is the constant function 1.
41
Why are these two not valid?
42
Let’s Find Out x 1 x 1 x 2 x 2 1 1 1 1 1 1 m0 m3
43
Let’s Find Out + = m0 + m3 = m0 + m3 x x x x x x 1 1 1 1 1 1 1 1 1 1 1
2 x 2 x 2 1 1 1 1 1 + = 1 1 1 1 1 m0 + m3 = m0 + m3
44
Let’s Find Out + = m0 + m3 = m0 + m3 x x x x x x 1 1 1 1 1 1 1 1 1 1 1
2 x 2 x 2 1 1 1 1 1 + = 1 1 1 1 1 m0 + m3 = m0 + m3
45
Let’s Find Out + = m0 + m3 = m0 + m3 _ _ = + _ _ +
x 1 x 1 x 1 x 2 x 2 x 2 1 1 1 1 1 + = 1 1 1 1 1 m0 + m3 = m0 + m3 _ _ = x1x2 + _ _ x1x2 + x1x2 We can’t use Property 14a here. This can’t be simplified.
46
Three-Variable K-Map
47
Location of three-variable minterms
[ Figure 2.51 from the textbook ]
48
Location of three-variable minterms
Notice the placement of Variables Binary pair values Minterms
49
Location of three-variable minterms
Notice the placement of Variables Binary pair values Minterms
50
Location of three-variable minterms
Notice the placement of Variables Binary pair values Minterms
51
Gray Code Sequence of binary codes
Two neighboring lines vary by only 1 bit 000 001 011 010 110 111 101 100 00 01 11 10
52
Gray Code & K-map s x1 x2
53
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101
54
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101
55
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101
56
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101
57
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101
58
differ only in the LAST bit
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101 These two neighbors differ only in the LAST bit
59
differ only in the LAST bit
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101 These two neighbors differ only in the LAST bit
60
differ only in the FIRST bit
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101 These two neighbors differ only in the FIRST bit
61
Gray Code & K-map s x1 x2 These four neighbors
000 010 110 100 001 011 111 101 These four neighbors differ in the FIRST and LAST bit They are similar in their MIDDLE bit
62
Adjacency Rules adjacent columns
63
differ only in the FIRST bit
Gray Code & K-map s x1 x2 000 010 110 100 001 011 111 101 These two neighbors differ only in the FIRST bit
64
Gray Code & K-map s x1 x2 These four neighbors
000 010 110 100 001 011 111 101 These four neighbors differ in the FIRST and LAST bit They are similar in their MIDDLE bit
65
Adjacency Rules As if the K-map were adjacent drawn on a cylinder
columns
66
Adjacency Rules m0 m2 m4 m1 m3 m5 As if the K-map were adjacent
drawn on a cylinder adjacent columns
67
These are valid groupings
68
These are valid groupings
69
These are valid groupings
70
These are valid groupings
71
These are valid groupings
72
This is a valid grouping
73
Some invalid groupings
74
Examples of three-variable Karnaugh maps
[ Figure 2.52a from the textbook ]
75
Examples of three-variable Karnaugh maps
[ Figure 2.52b from the textbook ]
76
Four-Variable K-Map
77
A four-variable Karnaugh map
[ Figure 2.53 from the textbook ]
78
A four-variable Karnaugh map
x1 x2 x3 x4 m0 1 m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14 m15
79
Adjacency Rules adjacent rows adjacent columns adjacent columns
80
Adjacency Rules adjacent rows As if the K-map were drawn on a torus
columns
81
Adjacency Rules m8 m10 m0 m2 m14 m12 m6 m4 adjacent rows
As if the K-map were drawn on a torus adjacent columns
82
Some Valid Groupings
83
Some Valid Groupings
84
Some Valid Groupings
85
Some Valid Groupings
86
Some Invalid Groupings
All sides must be powers of 2.
87
Some valid Groupings All sides must be powers of 2.
88
Example of a four-variable Karnaugh map
[ Figure 2.54 from the textbook ]
89
Example of a four-variable Karnaugh map
[ Figure 2.54 from the textbook ]
90
Example of a four-variable Karnaugh map
[ Figure 2.54 from the textbook ]
91
Example of a four-variable Karnaugh map
[ Figure 2.54 from the textbook ]
92
Five-Variable K-Map
93
A five-variable Karnaugh map
[ Figure 2.55 from the textbook ]
94
Questions?
95
THE END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.