Computer Science
a
b
c
a
b
c
N. B. Dodge 9/15
a
b
c
Original logic circuit
a
b
c
N. B. Dodge 9/15
Karnaugh Maps
Another approach to simplification is
called the Karnaugh map, or K-map.
A K-map is a truth table graph, which
aids in visually simplifying logic.
It is useful for up to 5 or 6 variables, and
is a good tool to help understand the
process of logic simplification.
The algebraic approach we have used
previously is also used to analyze complex
circuits in industry (computer analysis).
At the right is a 2-variable K-map.
This very simple K-map demonstrates
that an n-variable K-map contains all the
combination of the n variables in the Kmap space.
3
x
x
00
01
10
11
This minterm
is expressed as
.
f = xy
Two-Variable K-map,
labeled for SOP terms.
Note the four squares
represent all the combinations of the two
K-map variables, or
minterms, in x & y
(example above).
N. B. Dodge 9/15
y z yz yz yz
x
x
000
001
011
010
100
101
111
110
As an example, this
minterm cell (011)
represents the
minterm f = x yz .
N. B. Dodge 9/15
yz
0000
wx
wx
0 1
1100
C
wx
0001
0
0100
wx
1000
8
yz yz yz
1101
12 D
3 2
0111
5 7
1111
1011
9 B
0110
7 6
1 13 F 1 15
1001
8 9
0010
1 3
0101
4 5
0011
1110
E
14
1010
11 A
10
N. B. Dodge 9/15
Exercise 1
We will use the Karnaugh map to
simplify Boolean expressions by
placing minterm or maxterm
values on the map and then
grouping terms to develop
simpler Boolean expressions.
Lets practice placing some terms
on the K-map shown. For the
SOP Boolean expression below,
place 1s and zeros on the map.
yz
0000
wx
0
0100
wx
wx
4
1100
yz yz yz
0001
0 1
wx
1000
8
1 3
0101
4 5
0110
1011
1110
15 E
9 B
7 6
1111
1001
8 9
0111
13 F
0010
3 2
5 7
1101
C 12 D
0011
14
1010
11 A
10
N. B. Dodge 9/15
yz
0000
0001
0 1
0100
4
1100
C
1000
8
yz yz yz
1101
12 D
3 2
0111
5 7
1111
1011
9 B
0110
7 6
1 13 F 1 15
1001
8 9
0010
1 3
0101
4 5
0011
1110
E
14
1010
11 A
10
N. B. Dodge 9/15
Exercise 2
yz
Try your hand at developing
the Boolean expression from
the f = m designation on a Kmap.
The m designation of a
Boolean function is given as
f= m(9, B, D, F) (SOP).
Find the Boolean expression by
plotting the 1s on the chart
and developing the expression
from the minterms.
8
0000
wx
wx
1100
1000
8
0011
0 1
wx
0001
0
0100
wx
yz yz yz
1 3
0101
4 5
0010
0111
5 7
1101
12 D
3 2
1111
13 F
1001
8 9
0110
7 6
1110
15 E
1011
9 B
14
1010
11 A
10
N. B. Dodge 9/15
yz
0000
wx
wx
0 1
1100
C
wx
0001
0
0100
wx
1000
8
yz yz yz
1101
12 D
0010
1 3
0101
4 5
0011
3 2
0111
5 7
1111
0110
7 6
1 13 F 1 15
1001
8 9
1011
9 B
1110
E
14
1010
11 A
10
N. B. Dodge 9/15
Prime Implicants
We will be simplifying Boolean
functions plotting their values on
a K-map and grouping them into
prime implicants.
What is a prime implicant? It is
an implicant that covers as many
1 values (SOP K-map) or 0
values (POS K-map) as possible,
yet still retains the identity of
implicant (# of cells = power of 2,
rectangular or square shape).
Some SOP prime implicants are
shown on the adjoining K-map.
10
yz
0000
wx
wx
wx
wx
1000
0 1
11
1100
C
0001
0100
yz yz yz
0
0101
4 5
01
1101
11
12 D
1001
8 9
0011
1 3
0010
3 2
0111
5 7
11
1111
13 F
11
1011
9 B
0110
7 6
11
1110
15 E
14
1010
11 A
10
N. B. Dodge 9/15
11
N. B. Dodge 9/15
Prime Implicants
12
yz
0000
wx
wx
0 1
1100
C
wx
0001
0
0100
wx
1000
8
yz yz yz
1 3
0101
4 5
15
1101
12 D
0011
0010
3 2
0111
0110
11
7
1111
1 13 F 1115
1001
8 9
1011
9 B
1110
E
14
1010
11 A
10
N. B. Dodge 9/15
13
yz
0000
wx
wx
0 1
11
1100
C
wx
0001
0
0100
wx
1000
8
yz yz yz
11
1101
12 D
3 2
0111
5 7
11
1111
1011
9 B
0110
7 6
11 13 F 1115
1001
8 9
0010
1 3
0101
4 5
0011
11
1110
E
14
1010
11 A
10
N. B. Dodge 9/15
Another example:
The implicants of f are 4, 6, 12, 14.
This corresponds to the function:
f = wx yz + wxyz + wx yz + wxyz
We create a prime implicant by
grouping the 4 cells representing f.
On the wx axis, the cells are 1
whether or not w is one, and
always when x is 1 (w not needed).
On the yz axis, the cells are 1
whether or not y is one, and
always when z is 0 (y not needed).
Thus the simplified expression for
f is: f = xz .
14
yz
yz yz yz
0000
wx
0001
0 1
0100
wx
1
1
4
wx
1100
C
wx
1000
8
1101
1 12
0010
1 3
0101
4 5
0011
3 2
0111
5 7
1111
0110
7 6
1 13 F 1 15
1001
8 9
1011
9 B
1
6
1110
E
114
1010
11 A
10
N. B. Dodge 9/15
A POS K-Map
On a POS K-map, the procedure is
the same, except that we map 0s.
Let:
f = (w + x + y + z) (w + x + y + z) w + x
( w + x + y + z ) ( w + x + y + z )
We find prime implicants exactly
the same way except that we look
for variable that produce 0s.
As shown, w and y do not change
over the extent of the function.
The simplified expression
is: =
f ( w + y ). The simplified
circuit is shown at right.
15
0000
0001
0 1
w+ x
0100
w+ x
1100
w+ x
1000
1 3
0101
4 5
1101
12 D
0011
0010
3 2
0111
5 7
0110
7 6
1111
1110
1011
1010
1 13 F 01 15 E 0 14
1001
8 9
9 B
0 11
0 10
f
N. B. Dodge 9/15
16
N. B. Dodge 9/15
f = wx yz + wxyz + wxyz + wx yz
+ wxyz + wxyz + wx yz + wxyz
yz
yz yz yz
0000
wx
0001
0 1
0100
f = xy + xz + wz
17
wx
wx
1100
C
wx
1000
8
1 3
0101
4
0011
3 2
0111
1
1
1
1
5
5 7
1101
0010
2
0110
1
1
6
6
1111
1110
1011
1010
11 13 F 11 15 E 1 14
12 D
1001
8 9
9 B
1 11
10
N. B. Dodge 9/15
18
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
1
N. B. Dodge 9/15
19
yz
yz yz yz
0000
wx
0001
0 1
0100
wx
wx
4 5
1000
8
1
5
1101
112
3 2
0111
7
1111
1011
9 B
0110
7 6
1 13 F 1 15
1001
8 9
0010
1 3
0101
1100
C
wx
0011
1110
E
14
1010
11 A
10
f = wx yz + wx yz + wx yz + wx yz
N. B. Dodge 9/15
20
N. B. Dodge 9/15
Exercise 3
The truth table below was developed from a spec. Show the
SOP expression and then minimize it using a K-map and draw
the minimized circuit.
x y z f
0
0
0
0
1
1
1
1
21
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
1
0
1
1
0
0
0
1
y z yz yz yz
x
x
000
001
011
010
100
101
111
110
N. B. Dodge 9/15
22
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
f
1
1
1
1
1
1
N. B. Dodge 9/15
yz
0000
wx
0001
0 1
0100
wx
wx
wx
1000
8
0101
4 5
1100
C
yz
yz yz yz
0010
1 3
15
1101
12
0011
3 2
0111
7
1111
8 9
1011
9 B
wx
0110
7 6
1
1
D 13 F 15
1001
0000
1110
E
wx
14
1010
11 A
wx
10
0 1
1100
C
wx
0001
0
0100
1000
8
yz yz yz
1
0101
4 5
3 2
0111
7
1111
7 6
1110
1011
9 B
0110
1 13 F 1 15
1001
8 9
0010
1 3
1
5
1101
12 D
0011
14
1010
11 A
10
Correct Solution:
yz
=
f xz + yz
Remember: Prime implicants should overlap, if this means that they can be made larger.
23
N. B. Dodge 9/15
Resulting Circuit
x
y
z
N. B. Dodge 9/15
yz
f = m(1,2,3,5,7,11,13)
Note that there are 3
distinguished one-cells (in red).
There must therefore be at least
3 prime implicants (4 in this
case, 3 essential).
The simplified expression (and
not very simplified at that) is:
0000
wx
wx
0 1
1100
C
wx
0001
0
0100
wx
1000
8
yz yz yz
1
0101
4 5
1 3
11 5
1101
12 D
0011
0010
3 2
0111
7
11
1111
8 9
1011
9 B
0110
7 6
11 13 F 1 15
1001
1
1
1110
E
14
1010
11 A
10
f =wz + w xy + x yz + x yz
25
N. B. Dodge 9/15
Exercise 4
A truth table and its Boolean expression are shown below, along
with the circuit of this unsimplified expression. Use the K-map
on the following page to simplify and draw the simplified circuit.
26
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
1
1
Original Circuit
1
f = wx yz + wxyz + wxyz + wx yz
N. B. Dodge 9/15
wx
wx
0 1
1100
C
wx
27
0001
0
0100
wx
1000
8
yz yz yz
0101
4 5
1101
12 D
1001
8 9
0011
1 3
0010
3 2
0111
5 7
13 F
1 15
1011
9 B
0110
7 6
1111
1110
E
14
1010
11 A
10
N. B. Dodge 9/15
yz
yz yz yz
0000
wx
0001
X0
0100
wx
wx
1
X
wx
4 5
12
1000
1101
0010
1 3
0101
1100
C
0011
3 2
0111
5 7
1111
0110
7 6
1
1
D 13 F 15
1001
8 9
1011
9 B
1110
14
1010
11 A
10
N. B. Dodge 9/15
yz
yz yz yz
0000
wx
0001
10
0100
wx
wx
1100
C
wx
11
1 3
0101
4 5
11
5
1101
12 D
1000
8
0010
3 2
0111
0110
11
7
1111
1113 F 1115
1001
8 9
0011
1011
9 B
11
6
1110
E
114
1010
11 A
10
N. B. Dodge 9/15
30
yz
yz yz yz
0000
wx
0001
0 1
0100
wx
wx
1000
8
1
1
5
5
1101
1 12
0010
1 3
0101
1100
C
wx
0011
3 2
0111
1
1
7
1111
0110
7 6
11 13 F 1115
1001
8 9
1011
9 B
1110
E
114
1010
11 A
10
N. B. Dodge 9/15
N. B. Dodge 9/15
Exercise 5
An SOP Boolean expression is
defined as f=m(2, 6, C, D, F, E).
The inputs are such that w is
never 1 when x = 0.
Find the simplified expression
and draw the simplified circuit.
yz
0000
wx
wx
0 1
1100
C
wx
32
0001
0
0100
wx
1000
8
yz yz yz
0010
1 3
0101
4 5
0011
1101
12 D
1001
8 9
3 2
0111
5 7
1111
13 F
9 B
0110
7 6
1110
15 E
1011
14
1010
11 A
10
N. B. Dodge 9/15