Professional Documents
Culture Documents
a b c a b c f f
f abc abc abc f abc abc abc abc (since x=x+x) (i + ) f ( abc abc ) ( abc abc ) f ac ( b b ) ab( c c ) or, or f ac ab
N. B. Dodge 01/12
a b c
Original logic circuit
a b c f
Karnaugh Maps
Another approach to simplification is called the Karnaugh map, or K-map. A K-map is a truth table graph, which aids i visually simplifying logic. id in i ll i lif i l i It is useful for up to 5 or 6 variables, and is a good tool to help understand the p process of logic simplification. g p 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. 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.
y
x x
00 0 10 2 01 1 11 3
y
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, minterms in x & y (example above).
N. B. Dodge 01/12
y z yz yz yz x x
000 0 100 4 001 1 101 5 011 3 111 7 010 2 110 6
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
wx
0 0100
wx
wx
wx
1100 C 1000 8 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
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. p p Lets practice placing some terms on the K-map shown. For the p SOP Boolean expression below, place 1s and zeros on the map.
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
wx
0 0100
wx
wx
wx
1100 C 1000 8 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
yz
0000 0 0100 4 0 1
yz yz yz
0001 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
1100 C 1000 8 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
* m is the symbol for the coordinate of the square. 7 Lecture #5: Logic Simplification Using Karnaugh Maps
Observe that the notations (in either SOP or POS) completely describe the Boolean function mapped on the K-map, as long as one knows what the input variables are.
N. B. Dodge 01/12
Exercise 2
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
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
wx
0 0100
wx wx wx
1100 C 1000 8 12
1101 D
f= m(9, B, D, F) (SOP).
Find the Boolean expression by plotting the 1s on the chart and developing the expression from th minterms. f the i t
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
wx
0 0100
wx
wx
wx
1100 C 1000 8 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
Prime Implicants p
We will be simplifying Boolean functions plotting their values on a K map and grouping them into K-map 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.
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2
wx
0 01 11 0
1 11
0100
wx
1 1
1 1
0101 4 5
0111 5 7
1 1
0110 7 6
wx
wx
1100 C 12
1101 D
1111 13 F
1 1 0
1110 15 E
14
1000 8
1001 8 9
1011 9 B
1010 11 A
10
10
N. B. Dodge 01/12
Another prime implicant Distinguished 1-cell: A single minterm that can be covered by only yz yz yz yz one prime implicant. 0000 0001 0011 0010 Essential prime implicant: A prime wx 0 0 1 1 3 3 2 2 implicant that covers one or more 0100 0101 0111 0110 distinguished 1-cells. 1 wx 4 1 4 5 1 5 7 1 7 6 1 6 Note: Every fully minimized Boolean expression must include all 1100 1101 1111 1110 of the essential prime implicants of f. wx 1 13 F 1 15 E 1 1 C 12 D 14 In the K-map at right, the B l I th K t i ht th Boolean 1000 1001 1011 1010 minterm f = wxyz is a distinguished w x 8 8 9 9 B 11 A 10 1-cell, and the essential prime p y y prime Essential prime implicant that Distinguished 1 cell implicant f = wxy is the only p p p 1-cell covers distinguished 1-cell implicant that includes it. Lecture #5: Logic Simplification Using Karnaugh Maps
N. B. Dodge 01/12
11
Prime Implicants
As noted two slides back, a prime implicant is the largest square or rectangular implicant of cells occupied by a 1 (SOP) or 0 (POS). Thus a prime implicant will have 1, 2, 4, or 8 cells (16 is a trivial prime). How do we determine the Boolean expression for a prime implicant? The Boolean expression for an SOP prime implicant is determined by creating a new minterm whose only variables are those that do NOT change value (01 or 10) over the extent of the prime implicant. Thus the prime implicant at right may b represented b th B l be t d by the Boolean expression: f = xz.
Since x & z do not change value over the implicant, they are the variables in the new Boolean minterm.
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 7 0110 6
wx
0 0100
wx
15
1 17
wx
wx
1100 C 1000 8 12
1101 D
1 13 F 1 15 1
1011 9 B
1111
1110 E 1010 14
1001 8 9
12
11 A
10
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 5 0111 7 0110 6
wx
0 0100
wx
1 14
12
1 15
1 17
1 16
14
wx
wx
1100 C 1000 8
1101 D
1 13 F 1 15 1 1
1011 9 B
1111
1110 E 1010
1001 8 9
11 A
10
yz
0000
yz yz yz
0001 0 1 0101 4 5 0011 1 3 0010 3 2 2 0111 5 7 0110 7 6
f wx yz wxyz wx yz wxyz
We create a prime implicant by g grouping the 4 cells representing f. p g p g 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
wx
0 0100
wx
1 1 4
C
1 6 114
10
wx
wx
1100
1 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E
1000 8
1001 8 9
1010 11 A
Remember: For purposes of grouping implicants, the top and bottom rows of the K-map are considered adjacent, as are the right and left columns. This grouping takes advantage of the fact that the left and right columns are adjacent.
N. B. Dodge 01/12
A POS K-Map
On a POS K-map, the procedure is the same, except that we map 0s. Let:
y z yz y z yz
0000 0 0100 4 0001 0 1 0011 1 3 0010 3 2 2
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 th extent of th f the t t f the function. ti The simplified expression is: f ( w y ). The simplified circuit is shown at right. right
w x
0101 4 5
0111 5 7
0110 7 6
w x
1100 C 1000 8 12
1101 D
1 13 F 0 15 E 0 14 1
1011 9 B
1111
1110
w x
1001 8 9
0 11
1010 A
0 10
f
N. B. Dodge 01/12
15
yz
0000
yz yz yz
0001 0 1 0011 1 3 0111 0010 3 2 0110 7 2 0101 4
wx
0 0100
wx
1 1 1 5 71 5
1111 D
1 1 6 6
wx
wx
1100 C 1000 8 12
1101
1 1 1 13 F 1 15 E 1 14 1
1011 9 B
1110
1001 8 9
1 11
1010 A 10
f xy xz wz
17
x
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
y
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
z
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 1
1 1
18
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 7 0110 7 6
wx
0 0100
wx
1 5
wx
wx
1100 C
112
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1000 8
1001 8 9
11 A
10
f wx yz wx yz wx yz wx yz
N. B. Dodge 01/12
19
Equivalent circuit after reduction using Karnaugh map. Logic circuit from truth table.
20
N. B. Dodge 01/12
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 circuit. x y
0 0 0 0 1 1 1 1
21
z f
0 1 0 1 0 1 0 1 1 0 1 1 0 0 0 1
0 0 1 1 0 0 1 1
y z yz yz yz x x
000 0 100 4 001 1 101 5 011 3 111 7 010 2 110 6
N. B. Dodge 01/12
x
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
y
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
z
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
f
1
1 1 1
1 1
22
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 0 1
yz
0000 2
yz yz yz
0001 0 1
wx
0 0100
0011 1 3 0111 7
0010 3 2
wx
0 0100
0011 1 3 0111 7
0010 3 2 2
wx
0101 4 5
15
0110 7 6
wx
0101 4 5
1 5
0110 7 6
wx
wx
1100 C 1000 8 12
1101
1 13 F 1 15 D 1
1011 9 B
1111
1110 E 1010 14
wx
wx
1100 C 1000 8 12
1101 D
1 13 F 1 15 1
1011 9 B
1111
1110 E 1010 14
1001 8 9
1001 8 9
11 A
10
11 A
10
Correct Solution:
yz y
f xz yz
N. B. Dodge 01/12
Remember: Prime implicants should overlap, if this means that they can be made larger.
Lecture #5: Logic Simplification Using Karnaugh Maps
Resulting Circuit x y z
Note that the resulting circuit uses 3 logic gates, whereas the original expression, with six minterms, would have used a minimum of seven gates and four inverters. f i t
24 Lecture #5: Logic Simplification Using Karnaugh Maps
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 0 1
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:
wx
0 0100
0011 1 3
0010 3 2
1 1
wx
0101 4 5
1 15
0111 7
1 1
0110 7 6
wx
wx
1100 C 1000 8 12
1101 D
1 1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
f wz wx y x yz x yz
25 Lecture #5: Logic Simplification Using Karnaugh Maps
N. B. Dodge 01/12
Exercise 4
A truth table and i B l h bl d its Boolean expression are shown b l i h l below, along with the circuit of this unsimplified expression. Use the K-map on the following page to simplify and draw the simplified circuit.
w
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
x
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
y
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
z
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 01/12
26
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
wx
0 0100
wx
wx
wx
27
1100 C 1000 8 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 1 0101 4 5 0011 1 3 0010 3 2 2
wx
X0
0100
wx
1 X
X X
0111 5 7
0110 7 6
1 1
wx
wx
1100 C
1101
12
1 1 D 13 F 15
1011 9 B
1111
1110 E
14
1000 8
1001 8 9
1010 11 A 10
28
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 1 0101 4 5 0011 1 3 0010 3 2 2 0111 7 0110 6
wx
10
0100
wx
1 1
1 15
1 17
1 16 1 14
10
wx
wx
1100 C
112 1
1101 D
1 13 F 1 15 1 1
1011 9 B
1111
1110 E
1000 8
1001 8 9
1010 11 A
29
N. B. Dodge 01/12
yz
0000
yz yz yz
0001 0 1 0011 1 3 0111 0010 3 2 0110 7 6 2 0101 4
wx
0 0100
wx
1 15 5
D
1 1 7
wx
wx
1100 C
1 12
1101
1 13 F 1 15 1 1
1011 9 B
1111
1110 E
114
10
1000 8
1001 8 9
1010 11 A
30
N. B. Dodge 01/12
31
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
yz yz yz
0001 0 1 0011 1 3 0010 3 2 2 0101 4 5 0111 5 7 0110 7 6
wx
0 0100
wx
wx
wx
1100 C 1000 8 12
1101 D
1 13 F 1 15
1011 9 B
1111
1110 E 1010 14
1001 8 9
11 A
10
32
N. B. Dodge 01/12