K Map
K Map
For above
rule group
Overlapping
is applicable
There should be as few groups as possible, as
long as
Three-Variable K-Maps
f = (0,4) = B C f = (4,5) = A B f = (0,1,4,5)= B f = (0,1,2,3)= A
BC BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 1 1
1 1 0 0 0 1 1 1 0 0 1 1 1 0 0 1 0 0 0 0
BC BC BC BC
A 00 01 11 10 A 00 01 11 10 A 00 01 11 10 A 00 01 11 10
0 0 1 1 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 1
1 0 0 0 0 1 1 0 0 1 1 0 0 0 0 1 1 0 0 1
The 4-Variable K-Map
CD
00 01 11 10
AB
00 ABCD ABCD ABCD ABCD
CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 0 0 0 0 00 0 0 1 0 00 1 0 1 0 00 0 1 0 1
01 1 1 1 1 01 0 0 1 0 01 0 1 0 1 01 1 0 1 0
11 0 0 0 0 11 0 0 1 0 11 1 0 1 0 11 0 1 0 1
10 0 0 0 0 10 0 0 1 0 10 0 1 0 1 10 1 0 1 0
CD CD CD CD
00 01 11 10 00 01 11 10 00 01 11 10 00 01 11 10
AB AB AB AB
00 0 1 1 0 00 1 0 0 1 00 0 0 0 0 00 1 1 1 1
01 0 1 1 0 01 1 0 0 1 01 1 1 1 1 01 0 0 0 0
11 0 1 1 0 11 1 0 0 1 11 1 1 1 1 11 0 0 0 0
10 0 1 1 0 10 1 0 0 1 10 0 0 0 0 10 1 1 1 1
CD
00 01 11 10 B + AC + ACD
AB
00 1 1 AC
01 1 1 1 1 B
11 1 1 1 1
AC D
10 1
Determining the Minimum SOP Expression from the Map
C C
AB 0 1 0 1
AB
00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1
AB + BC + ABC B + AC + AC
Mapping Directly from a Truth Table
I/P O/P
A B C X C
0 0 0 1
0 1
AB
0 0 1 0
00 1
0 1 0 0
0 1 1 0 01
1 0 0 1
1 0 1 0 11 1 1
1 1 0 1
10 1
1 1 1 1
Don’t Care Conditions
• A don’t care condition, marked by (X) in the truth
table, indicates a condition where the design doesn’t
care if the output is a (0) or a (1).
• A don’t care condition can be treated as a (0) or a (1)
in a K-Map.
• Treating a don’t care as a (0) means that you do not
need to group it.
• Treating a don’t care as a (1) allows you to make a
grouping larger, resulting in a simpler term in the SOP
equation.
Some You Group, Some You Don’t
AB 0 0
AB X 0
0 0 0 0 X
0 0 0 1 0
V RT
0 0 1 0 1 TU TU TU TU
0 0 1 1 X
RS X 0
0 1 0 0 0 X 1
0 1 0 1 X
0 1 1 0 X RS 0 X 1 X
0 1 1 1 1
1 0 0 0 1 RS X 0 0 0 RS
1 0 0 1 1
1 0 1 0 1 RS 1 1 X 1
1 0 1 1 X
1 1 0 0 X
1 1 0 1 0 F4 = R T + R S
1 1 1 0 0
1 1 1 1 0
Example: Design a 3-input (A,B,C) digital circuit that will give at its output
(X) a logic 1 only if the binary number formed at the input has more ones
than zeros.
Inputs Output
A B C X X = (3, 5, 6, 7)
0 0 0 0 0
1 0 0 1 0 X
BC
2 0 1 0 0 A 00 01 11 10
3 0 1 1 1 0 0 0 1 0
4 1 0 0 0 1 0 1 1 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1 X = AC + AB +BC
A B C
Example: Design a 4-input (A,B,C,D) digital circuit that will give at
its output (X) a logic 1 only if the binary number formed at the
input is between 2 and 9 (including).
Inputs Output
A B C D X X = (2,3,4,5,6,7,8,9)
0 0 0 0 0 0
1 0 0 0 1 0 X
2 0 0 1 0 1 CD
3 0 0 1 1 1 AB 00 01 11 10
4 0 1 0 0 1 00 0 0 1 1 Same
5 0 1 0 1 1
01 1 1 1 1
6 0 1 1 0 1
7 0 1 1 1 1 11 0 0 0 0
8 1 0 0 0 1 10 1 1 0 0
9 1 0 0 1 1
10 1 0 1 0 0
11 1 0 1 1 0
12 1 1 0 0 0
X = AC + AB + AB C
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 0 X
A B C D