4 Karnaugh Maps
4 Karnaugh Maps
Karnaugh-Maps
© IT - TDT Computer Organisation 2
Acknowledgement
• The contents of these slides have origin from School of
Computing, National University of Singapore.
• We greatly appreciate support from Mr. Aaron Tan Tuck
Choy for kindly sharing these materials.
© IT - TDT Computer Organisation 3
KARNAUGH MAPS
• Function Simplification
• Algebraic Simplification
• Half Adder
• Introduction to K-maps
• How to use K-maps
• Converting to Minterms Form
• Prime Implicants and Essential Prime Implicants
• Example on Finding Minimal SOP Expression
• Finding POS Expression
• Don’t-care Conditions
CS2100 Karnaugh Maps 6
FUNCTION SIMPLIFICATION
• Why simplify?
• Simpler expression uses fewer logic gates.
• Thus cheaper, uses less power, (sometimes) faster.
• Techniques
• Algebraic
• Using theorems
• Open-ended; requires skills
• Karnaugh Maps
• Easy to use
• Limited to no more than 6 variables
• Quine-McCluskey (non-examinable)
• Suitable for automation
• Can handle many variables (but computationally intensive)
CS2100 Karnaugh Maps 7
• Simplified SOP:
• Simplified POS:
CS2100 Karnaugh Maps 10
CS2100 Karnaugh Maps 11
C
CS2100 Karnaugh Maps 13
INTRODUCTION TO K-MAPS
• Systematic method to obtain simplified (minimal) sum-of-
products (SOP) expressions.
• Objective: Fewest possible product terms and literals.
• Diagrammatic technique based on a special form of Venn
diagram.
• Advantage: Easy to use.
• Disadvantage: Limited to 5 or 6 variables.
CS2100 Karnaugh Maps 14
Alternative 1: Alternative 2:
b b a a
OR OR
a'b' a'b m0 m1 a'b' ab' m0 m2
a a m3 b b m1 m3
ab' ab m2 a'b ab
Alternative 3:
a a
OR
b ab a'b b m3 m1 and others…
ab' a'b' m2 m0
CS2100 Karnaugh Maps 17
b b
a 0 1
0
equivalent to:
a
1
a a
b 1 0
equivalent to: 0
b
1
CS2100 Karnaugh Maps 18
b b
a a
CS2100 Karnaugh Maps 19
c c
bc
a
00 01 11 10
0 m0 m1 m3 m2
1 m4 m5 m7 m6
a 0 1 0 0
1
c
5-2. Draw the K-map for this function A:
A(x, y, z) = x∙y + y∙z' + x'∙y'∙z
CS2100 Karnaugh Maps 22
y
yz
wx 00 01 11 10
00 m0 m1 m3 m2
m4 m5 m7 m6
01
x
m12 m13 m15 m14
11
w
m8 m9 m11 m10
10
z
CS2100 Karnaugh Maps 23
yz y
wx
m0 m1 m3 m2
m4 m5 m7 m6
x
m12 m13 m15 m14
w
m8 m9 m11 m10
z
CS2100 Karnaugh Maps 24
ef a'∙b' a'∙b ef
cd 00 01 11 10 10 11 01 00 cd
01 1 1
x (cells with ‘0’ are not
1 1
w
11 shown for clarity)
1 1
10
CS2100 Karnaugh Maps 31
= w.(x'+x).y 00
A
= w.y 01 1 1
x
11 1 1
w
10 1 1 B
z
CS2100 Karnaugh Maps 32
1 1 1 1 1 1 1 1
1 1 1 1
1 1 1 1 1 1 1
P P P
1 1 1 1
1 1 1 1
1 1 1
1 1 1 1 1
O O
CS2100 Karnaugh Maps 35
1 1 1 1 1 1
1
P
1 1 1 1 1
O
CS2100 Karnaugh Maps 39
1 1 1 1
P
1 1 1 1
1 1
O 1 1
1 1 1 1
CS2100 Karnaugh Maps 41
00 1 1
01 1 1
D
11 1 1 1
C
10 1 1
CS2100 Karnaugh Maps 43
B
A
AB
CD 00 01 11 10
00 1 1 Answer
01 1 1
D
11 1 1 1
C
10 1 1
CS2100 Karnaugh Maps 44
00 1 1
01 1 1
D
11 1 1 1
C
10 1 1
F(A,B,C,D) =
CS2100 Karnaugh Maps 45
A
AB
CD 00 01 11 10
00 1
01 1 1 1
D
11 1 1 1
C
10 1
CS2100 Karnaugh Maps 46
A
AB
CD 00 01 11 10
00 1 0 0 1
01 1 1 0 1
D
11 1 1 0 1
C
10 1 0 0 1
B
CS2100 Karnaugh Maps 47
K-map 00 1 0 0 1 00 0 1 1 0 K-map
of F 01 1 1 0 1 01 0 0 1 0 of F'
D D
11 1 1 0 1 11 0 0 1 0
C C
10 1 0 0 1 10 0 1 1 0
B B
CS2100 Karnaugh Maps 48
A
10 1
D
C
With don’t-cares: CD
AB 00 01 11 10
00 1 1
P = A'B'C'D' + B'CD + BC'D
+ BCD' + AD 01
1 1
B
11 X X X X
A
10 1 X X
D
CS2100 Karnaugh Maps 51
A
AB
CD 00 01 11 10
00 1 1
Fill in the 1’s.
01 1 1
D
11 1 1
C
10 1 1 1
B
CS2100 Karnaugh Maps 52
00 1 1
Find all PIs:
01 1 1
D
11 1 1
C
10 1 1 1
CS2100 Karnaugh Maps 53
A
AB
CD 00 01 11 10
00 X 1
Fill in the 1’s and X’s.
01 X
D
11 X X 1
C
10 1 1
B
CS2100 Karnaugh Maps 54
A
AB
CD 00 01 11 10 Do we need to have an
00 X 1 additional term A'B' to
01 X cover the 2 remaining X’s?
D
11 X X 1
C
10 1 1
Answer: F(A,B,C,D) =
CS2100 Karnaugh Maps 55
CD
AB
00 01 11 10
From K-map,
00 1 1 F' =
01 1 1 Using DeMorgan’s theorem,
D
11 1 1 F=
C
10 1
CS2100 Karnaugh Maps 56
01 X 1 1 1
Using DeMorgan’s theorem,
D
11 X X 1 F=
C
10 1 1
CS2100 Karnaugh Maps 57
READING ASSIGNMENT
• Alternative Solutions
• Read up DLD section 5.8, pg 101.
• Quine-McCluskey
• Not included in syllabus, but helps in further
understanding.
• Read up DLD section 5.10, pg 103 – 105.
© IT - TDT Computer Organisation 58
Q&A