K Map
K Map
1
Introduction
Two standard algebraic forms of a Boolean function:
2
Contd….
• Minimum cost two-level AND-OR gate circuits
–need to find minimum expressions in sum of products or products
of sums form.
𝑥𝑦
𝑥𝑦 𝑥𝑦
xa 𝑥𝑦 yb
6
Contd….
m0
m2 m1
x m3 by
a
y y
0 1
m0 𝑚1
x x 2 3
𝑚2 m3
7
Contd..
y 0 1
x
0 1 • Four minterms for two variables –
0 two variable K-map
four squares for each minterm.
1 2 3
8
Two variable Karnaugh maps
• Consider the truth table for a function F
• A’B’ and A’B are the minterms (indicated by 1’s in the squares of K-
map)
9
Contd…
• Minterms in the adjacent squares of the map can be combined –
differ by only one variable.
10
Contd…
• Minterms in the adjacent squares of the map can be combined –
differ by only one variable.
11
Three variable Karnaugh maps
• 8 minterms for 3 binary variables – K-map with 8 squares.
• Gray code – only one bit changes in value from one adjacent column
to the next.
12
Contd..
13
Contd..
15
Èxample…
• Simplify the Boolean function:
16
Contd..
• Any combination of four adjacent squares in the three-variable map –
represents the logical sum of four minterms.
17
Example
• Simplify the Boolean function:
18
Summary
19
Example
• Simplify the Boolean function:
20
Four variable Karnaugh maps
• Location of minterms on a four-variable map.
• First and last columns are also adjacent, first and last rows are also adjacent.
21
Contd..
22
Example..
23
Example
24
Five variable Karnaugh maps
• Boolean functions with five variables can be simplified using a 32-cell
Karnaugh map.
• Actually, two 4-variable maps (16 cells each) are used to construct a 5-
variable map.
• A Karnaugh map for five variables (ABCDE) can be constructed using two
4-variable maps with which you are already familiar.
• Each map contains 16 cells with all combinations of variables 8, C, D, and
E.
• One map is for A = 0 and the other is for A = I, as shown on the next slide.
25
• The best way to visualize cell adjacencies between the two 16-cell maps
is to imagine that the A = 0 map is placed on top of the A = 1 map.
• Each cell in the A = 0 map is adjacent to the cell directly below it in the A
= 1 map.
26
Cell adjacency
Each cell in the A = 0 map is
adjacent to the cell directly
below it in the A = I map.
27
Example
28
PoS Simplification
Minimum PoS expression:
29
Contd…
Minimum PoS expression:
30
Contd…
By combining adjacent
zero’s
31
Don’t care in K Maps
It is possible that a Boolean function is not specified for certain combination
of the variables.
Example – four binary code for the decimal digits – 6 unused combinations –
not specified.
33
Contd…
Don’t care the value of F – input combinations never occur anyway.
34
Contd…
Simplification – include each don’t care minterm with either the 1’s or
the 0’s.
35
Contd…
Simplification – include each don’t care minterm with either the 1’s or
the 0’s.
37
Prime Implicant Selection Rule
• Minimize the overlap among prime implicants as much as possible. In
particular, in the final solution, make sure that each prime implicant
selected includes at least one minterm not included in any other
prime implicant selected. Simplify F(A, B, C, D) given on the K-map.
Essential
CD C Selected CD C
AB AB
1 1 1 1
1 1 1 1 1 1 1 1
B B
1 1
A A
1 1 1 1
D D
Minterms covered by essential prime implicants
38
Example
Find ALL Prime Implicants
BD 1 1 BD 1 1
B B
1 1 1 1
A A
1 1 1 1 1 1 1 1
AB
D D
AD Minterms covered by single prime implicant
39
Example
Find all prime implicants for:
G(A,B,C,D) = Σm(0,2,3,4,7,12,13,14,15)
Hint: There are seven prime implicants!
40
Contd…
42
K-map Simplification Procedure
43