Professional Documents
Culture Documents
f(x,y,z)
0
0
0
0
0
0
1
1
0
1
0
1
0
1
0
0
1
1
1
1
0
0
1
1
0
1
0
1
0
1
1
1
Unsimplifying expressions
You can also convert the expression to a sum of minterms with Boolean
algebra.
Apply the distributive law in reverse to add in missing variables.
Very few people actually do this, but its occasionally useful.
f(x,y,z) = m1 + m5 + m6 + m7
Y
X
xyz
xyz
xyz
xyz
xyz
xyz
Y
xyz
xyz
m0
m4
m1
m5
m3
m7
m2
m6
You can also fill in the K-map directly from a truth table.
The output in row i of the table goes into square mi of the K-map.
f(x,y,z)
0
0
0
0
0
0
1
1
0
1
0
1
0
1
0
0
0
0
1
1
0
1
0
1
0
1
1
1
m1
m5
m3
m7
m2
m6
Y
X
1
1
1
1
m0
m4
0
0
1
1
0
1
0
1
The most difficult step is grouping together all the 1s in the K-map.
Make rectangles around groups of one, two, four or eight 1s.
All of the 1s in the map should be included in at least one rectangle.
Do not include any of the 0s.
Y
X
0
0
1
1
0
1
0
1
Each group corresponds to one product term. For the simplest result:
Make as few rectangles as possible, to minimize the number of products in
the final expression.
Make each rectangle as large as possible, to minimize the number of literals
in each term.
Its all right for rectangles to overlap, if that makes them larger.
0
0
1
1
0
1
0
1
Z
Y
X
xyz
xyz
xyz
xyz
xyz
xyz
xyz
xyz
For our example, we find that xy + yz + xz = yz + xy. (This is one of the additional
algebraic laws from last time.)
Practice K-map 1
Y
X
m0
m4
m1
m5
m3
m7
m2
m6
0
0
1
1
1
0
0
1
Four-variable K-maps
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
Y
wxyz
wxyz
X
wxyz
wxyz
m0
m4
m12
m8
m1
m5
m13
m9
m3
m7
m15
m11
m2
m6
X
m14
m10
1
0
0
1
0
1
1
0
0
0
0
0
Y
1
0
0
1
X
W
m0
m4
m12
m8
m1
m5
m13
m9
m3
m7
m15
m11
m2
m6
m14
m10
0 the
0 following
1
wxyz wxyz
wxyzxzwxyz
We can1 make
groups, resulting
in the MSP
+ xyz.
W
0
0
1
1
1
0
0
0
0
0
0
1
X
W
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
wxyz
10
Y
0
0
1
1
0
1
1
1
Z
Y
X
0
0
1
1
0
1
Y
1
1
0
0
1
1
0
1
yz + yz + xy
yz + yz + xz
1
1
11
Prime implicants
The challenge in using K-maps is selecting the right groups. If you dont
minimize the number of groups and maximize the size of each group:
Your resulting expression will still be equivalent to the original one.
But it wont be a minimal sum of products.
Whats a good approach to finding an actual MSP?
First find all of the largest possible groupings of 1s.
These are called the prime implicants.
The final MSP will contain a subset of these prime implicants.
Here is an example Karnaugh map with prime implicants marked:
Y
1
1
0
0
1
1
1
0
0
0
1
1
0
0
0
1
12
1
1
0
0
1
1
1
0
0
0
1
1
0
0
0
1
13
1
1
0
0
1
1
1
0
0
0
1
1
0
0
0
1
14
Practice K-map 2
0
1
1
0
0
0
1
0
1
1
1
1
0
1
X
1
0
15
0
1
1
0
0
0
1
0
1
1
1
1
0
1
X
1
0
16
I dont care!
You dont always need all 2n input combinations in an n-variable function.
If you can guarantee that certain input combinations never occur.
If some outputs arent used in the rest of the circuit.
We mark dont-care outputs in truth tables and K-maps with Xs.
f(x,y,z)
0
0
0
0
0
0
1
1
0
1
0
1
0
1
X
0
1
1
1
1
0
0
1
1
0
1
0
1
0
1
X
1
Within a K-map, each X can be considered as either 0 or 1. You should pick the
interpretation that allows for the most simplification.
17
CD
AB
00
00
01
11
10
01
11
10
X 18
CD + BD
June 17, 2002
Table for a
b
g
e
d
c
CD
AB
00
00
01
01
11
10
11
10
X 19
A + C + BD + BD
June 17, 2002
Practice K-map 3
1
1
0
1
0
1
x
0
0
x
1
0
1
0
X
1
x
20
1
1
0
1
0
1
x
0
Z
Y
0
x
1
0
1
0 X
1
x
21
Summary
22