Five Variable Maps
Five Variable Maps d
Two methods: 1
1) 32 squares
This map for e=0 a
Think of two maps on top of each other
1
1
1
1 1 0 1
b
1 1 1 1
b
1 1 e 1
b
c
d
This map for e=1
One can circle squares: on either level, or between levels.
0 a
1
1 1
c
2) Enter variables (letters) on the 16 square map This is the same as putting a “1” on the e=0 map This is the same as putting a “1” on the e=1 map Can circle
e 1
Cannot circle
e e
e 1
d
e
1 1
a
1
1 1
c
Best for where “e” has simple relations: relations: “e” is in only a few squares or “e” is in almost all the squares. Printed; 11/02/04 Modified; February 11, 2004
Slide 46
Department of Electronics, Carleton University © John K night
Di gital Cir cuits p. 91
Fi ve Varia bl e Maps
Fi ve Varia ble Maps
Five Variable Maps
d
d
1
Wrap Around
To circle between layers, the layers must have a “1” in the same position on both layers. These are the squares which differ by only one input bit.
1
a
1
e=0 d
c
e=0
O K
1
For complicated functions using the double map is usually easier.
b a
1
1
Use of variable of variable entered maps
For many functions one of the variables has a simple relationship. relationship. Then the variable entered map is simpler. simpler.
1 b
d
1 b
a
e=1
b a
1
1
58.• PROBLEM
1
c
1 c
e=1
d
Plot the variable entered map on the right on the 5-variable map on its left.
b a
d
e=0
c
e
d a b a
Department of Electronics, Carleton University © John K night
1 1 e 1
1 e
b
c
Variable entered map
e=1
Printed; 11/02/04 Modified; February 11, 2004
c
c
Comment on Slide 46
Digital Circuits p. 92
Fi ve Varia bl e Maps
Fi ve Varia ble Maps
Five Variable Maps Method 1: Dual 4-Variable maps
d 1
Terms for circles only on the e=0 map are ANDed with e
e=0
F = e(b·d e( b·d))
Terms for circles only on the e=1 map are ANDed with e
1
1
b
1 1 1 1
b
c
d
0
+ e(cd e( cd))
e=1
Method 2: Variable Entered Maps
“1s” in circles containing e must be in another circle containing e or all “1s”.
1
+ acd + ab
Terms for circles on both both maps don’t mention e.
“1s” in circles containing e must also be in another circle containing e or all “1s”.
a
1 1 0 1
a
1
1 1
c
1 e 1 e or e 1 d
1 e or 1 e e 1
F = e(b·d e(b·d))
1 1 e 1
e
+ acd + ab
Terms for circles containing e are ANDed with e
a
+ e(cd e( cd))
1
1
1
b
c
Terms for circles containing e are ANDed with e
Printed; 11/02/04 Modified; February 11, 2004
Slide 47 Comm entonSli de63
Department of Electronics, Carleton University © John K night
Di gital Cir cuits p. 93
Fi ve Varia bl e Maps
Fiv e-Varia ble Maps
Five-Variable Maps The “0” is specifically entered on one map, just to remind you that it is a “1” on the other map. Normally “0” are left blank to r educe the clutter. clutter. 59.• PROBLEM
d
F = (abc + abd + cb)e + (abd + ac + adb)e = (abc + cb)e + (ac + adb)e +abd
b
Plot F on the 5 variable map on the right.
a
Plot F on the variable entered map on the right.
d
e=0
60.• PROBLEM (based on the last problem)
c
d
b a
Circle the 5 variable map and reduce F to 12 letters. Circle the variable entered entered map and reduce F to 4 terms of 3 letters each.
b a
e=1
Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John K night
c
Variable entered map c
Comment on Slide 47
Digital Circuits p. 94
Five Variable Maps
Five Variable Maps
Five Variable Maps John’s solution
Method 1: Dual maps d 1
e=0
1 1
Tom’s solution
d
d d
d
d 1
e=0 a
1
d d
1
d 1 b
e=0 a
1
1
1
e=1
1
d
1
1
1 1
a
d
b
e=1
1
0
a
1
c
Method 2: Variable entered
b
d
0
e=1
1
1
c
d 1
0
b
1
1
c 1
d d
d
1
c F = e(abd) + bd + abcd
F = e(abd) + bd + e(abcd)
d
d / e 1 d/ 0 e / d e
d / e 1 d / 0 e / d b e
a
e / d 1
e / d 1
Tom says, “The interaction of d and e is too complex. Use dual maps.”
c F = e(abd) + bd + e(abcd)
Printed; 11/02/04 Modified; February 11, 2004
Slide 48
Department of Electronics, Carleton University © John Knight
Five Variable Maps
Digital Circuits p. 95
Five Variable Maps With Don’t Cares
Five Variable Maps With Don’t Cares Method 1: Dual 4-variable maps The extension to 5 variables is straight forward. As before, “ d ” can be optionally circled like “1”.
Method 2: Variable entered maps This is mu ch harder. Some new notation must be devised. A “d ” by itself in a square means a “ d ” in both the upper and lower levels. If a “d ” is on only one level, the value on the other level must be specified. “d / e” means “ d ” on the top level and “1” on the lower (e=1) level.
“e / d ” means “1” on the upper level, the e level, and “d ” on the lower level. One must also have “0 / d ” and “ d /0” The result is very difficult to circle properly. However it may be useful if e appears in a very simple way.
Method 3: Split-square maps A third method for 5 variables would be to use a “ / ” if the symbols differed between the levels.
1 / 0
Thus 1/0, 0/1, d /0 , d /1, 0/ d and 1/ d would be introduced. You can judge if this is an improvement over Method 2.
a
d / 1 1 d / 0 1 / d b 1 / d 1
c Method 3 map
Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John Knight
Comment on Slide 48
Digital Circuits p. 96
Multiple Output Maps
Five Variable Maps
Multiple Output Maps Two or more outputs Same inputs
d
Find the circuits for F and G
1 1
Need two maps Need two circuits
a
1 1
1 1 1
Often one can share some gates
Map of F
We optimized maps individually got one common gate abd. size measures 29 letters (literals) 37 gate inputs 11 gates
a c d b c d a b d
d
a
1 1 1 1
d
1 1 1
1 c
Printed; 11/02/04 Modified; February 11, 2004
b
d b
a
1
F
a
1
1 1
1 1 1
1
G
b
c d
a
G=b·c·d+acd
Department of Electronics, Carleton University © John Knight
Multiple Output Maps
b
a b c
c
+u+abd +abc 13 letters
1
b c d a c d a b d
3 letters
1
1 1
1 1 1
Map of G c
d
a b c
1
c
u=abd
a b
F = a·c·d+bcd
1
+u+abc+acd 13 letters Slide 49
Digital Circuits p. 97
Five Variable Maps With Don’t Cares
Circuit With Two Outputs Multiple Outputs The change between multiple outputs and single outputs
With multiple outputs, one can often find common gates that can be used for both outputs. Often these common gates are not optimum for either individual circuit, but are optimum for the whole circuit. In the example •
In this slide the circuits were optimized individually with a half-hearted effort to find common terms.
•
In the next slide, common terms were agressively sought out.
Circuit complexity
There are several ways to estimate the size of the circuit. The same measures also estimate power dissipation which is now likely to be more important than size. •
Inverters are not usually counted in the gate count. This is because most will be absorbed when one does a AND/OR to NAND/NOR conversion.
•
The number of gates.
•
The number of gate inputs. This admits that multi-input gates are larger.
•
The number of letters on the right hand side of the expressions. This is easy to do, and is usually considered the best estimate.
Note these are relative estimates; used for estimating if one circuit bigger than another. An exact estimate is usually not needed since modern logic is quite inexpensive. It is like estimating the cost of s omething as $10.00 and quibbiling whether it was really $9.98.
Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John Knight
Comment on Slide 49
Digital Circuits p. 98
Multiple Output Maps
Multiple Outputs, Finding Common Terms
Multiple Outputs, Finding Common Terms d
Try to share terms
1 1
Identify common squares on both maps • Circle common terms even if the individual maps allow larger circles •
•
d
1 1
a
1
1 1 1
b
a
1
1 1
1
1 1 1
c
Check, sometimes this doesn’t help.
1
b
c Map of G
Map of F
• Here changed 3-input AND to 4-input and removed another 3-input.
size measures Prev This slide slide 29 letters (literals) 29 33 gate inputs 37 9 gates 11
d
d
a
1 1
1 1 1
a b c
w=abcd u=abd
a b
d
b
1 a
1
+abc+abc ab c 11 gate inputs
c
Printed; 11/02/04 Modified; February 11, 2004
1 1
a
c d
d
F =v+w+u
1
G
F
a b c a b c
d
1 1
c
11 gate inputs
v=a·b·c·d
a b
1 1 1
1
b c
b
a
G=v+w+u +acd+ab·c acd 11 gate inputs
c
Slide 50
Department of Electronics, Carleton University © John Knight
Digital Circuits p. 99
Multiple Output Maps
Multiple Outputs
Multiple Outputs Collecting the u+v+w terms would reduce the number of letters and gate inputs, but will increase the number of gates. However the total logic is clearly reduced. F = abc + abc + x G
(7 letters, 9 inputs, 3 gates)
= acd + ab·c + x
x = a·b·c·d + abcd + abd
(7 letters, 9 inputs, 3 gates) (11 letters, 14 inputs, 4 gates))
Total: 25 letters, 10 gates, 32 gate inputs 61.• PROBLEM Find the Σ of Π expressions w ith minimal logic for the two-output circuit E,F.
W X Y Z
Soln has 5 gates.
Z
YZ WX 00
E
00
F
01 11
If it does not have to be pure Σ of Π, it can be done in 5 two-input gates, or, with factoring, 4 gates.
W
01 11
Z 01 11
10
00
d 1
1
d
d
1
1
d
1
10
YZ WX 00
10
E
d
1 Y
01
X
11
W
1 d
1 1 d 1
X
10
F
Y
62.• PROBLEM Find the minimum circuit with the three outputs defined by the maps below. This is a h ard problem. You should read over the example for the 7-segment display drivers before attempting it. . YZ WX 00 00 01
1 1
1 1
1
1 1
10
E=
Printed; 11/02/04 Modified; February 11, 2004
YZ WX 00
10
00 01
X
d
11
W
Z 0 1 11
W Y
1
F=
YZ WX 00
10
1 1
00
1
11 10
Z 01 11
1 d
1 1 Y
Department of Electronics, Carleton University © John Knight
01
X W
11 10
1
Z 01 11 10
1 1 1 1
G=
1 1 1 1 1 1 d Y
Comment on Slide 50
Digital Circuits p. 100
Multiple Output Maps
7-Segment Display Driver,
7-Segment Display Driver, YZ WX 00 00 0000 01 0100 11 1100 10 1000
01
0001 0101 1101 1001
11
YZ WX 00
10
0011 0010 0111 0110 1111 1110 1011 1010
BCD Digits in binary
Design Driver Logic
Z Y
C I G O L
X W
b a f g e d c
a f
01 11
10
00 b
g
01 11
e
c
10
Design this logic
d
D igits with “a” lit
D igits with “b” lit
D igits with “c” lit
Digits with “e” lit
Digits with “f” lit
Digits with “g” lit
Decimal digits displayed
4 inputs, 7 outputs 7 maps, each with 6 don’t cares
Generate Maps Choose segment “a” find all the squares where “a” is lit. Repeat for “b”, “c”, . . .
Digits with “d” lit
Printed; 11/02/04 Modified; February 11, 2004
Slide 51
Department of Electronics, Carleton University © John Knight
Multiple Output Maps
Digital Circuits p. 101
Seven-Segment Display Driver
Seven-Segment Display Driver Design Example The slide above, shows the bars in a seven segment display such as is used in many automotive dashboard displays, or other bright displays 1. All the digits from 0 through nine can be shown by lighting the proper bars. Design a circuit which takes a binary-coded-decimal (BCD) digit in on leads W,X,Y and Z and sends out the proper signals to light the 7-segment display on leads a, b, c, d, e, f, and g. Binary-coded decimal (BCD) digits only go from 0 to 9. The other numbers, 10 through 15 will never be received as inputs. Utilize this fact in your solution. 63.• PROBLEM The digits on the right have a revised form for 1, 7, 6 and 9.
YZ WX \
Derive the equations for the display drivers. Keep the same notation for all items that do not change. Minimize the equations for multiple outputs, as is done in the next few pages. If you have new terms, the letters H, Q, S, T, U and V have not been used.
Revised display
1. The bright light-emitting diode displays use 7-segments as s hown. The dimmer watch and control panel displays are usually liquid crystal and have more complex driver logic.
Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John Knight
Comment on Slide 51
Digital Circuits p. 102
Multiple Output Maps
7-Segment Display Driver,
Maps for 7-Segment Display Driver
Z
1
1
d d d d 1 1 d d
W
Transfer lit segment maps to Karnaugh maps
a
Z
1 1
X
1
1
1 1
1
d d d d d d 1
Y
b
d
1
1
1
1
d d d d d d 1
W
e
Y
1 1
1
1 1
X
1 1
1 1 1
d d d d 1 1 d d
W
c
Y
Z
1 X
Z
d d d d 1 1 d d
W
Z
1
W
1 1
1
Digits with “a” lit
Z
X
Y
Z
1 1 1
1
1
1
1
d d d d 1 1 d d
W
Y
f
Y
1
X
d d d d 1 1 d d
W
X
g
X
Y
Minimization Look for isolated “1”s with no neighbors. Look for isolated pairs of “1”s with no neighbors. These will always have to be circled individually. Z
1
1
1
d d d d d d 1 d
1
1
d d d d d d 1
W
e
Y
Printed; 11/02/04 Modified; February 11, 2004
1
1
1 1
X
Z
Z
Z
1 W
Expand circles to include “ d ”
1 1
1
X W
1
d d d d 1 1 d d
X
1
1
1
X
d d d d 1 1 d d
W
g
Y
f
Y
1
Y Slide 52
Department of Electronics, Carleton University © John Knight
Digital Circuits p. 103
Multiple Output Maps
BCD Display
BCD Display Typical Minimization Procedure This should work fairly well as as a general procedure, but a clever person may find more efficient procedures for certain problems. Z
1. Locate isolated “1”s. 1 1 1 These are “1”s in a square 1 1 that cannot be grouped with d d W any other square except 1 d d d Y possibly a “d ” squares. Isolated 2. Circle these isolated “1”s and expand the circle to include any “ d ”s.
Z
Z 1 X W
1
1
1
1
d d
1 e
X W
1
Y
Z 1
1
1
1
1
X W
1 f
1
1
1
d d d d 1 1 d d
Y
Isolated pair
g
X
Y
3. Locate isolated pairs of “1”s in which neither “1” can be paired with another any other square. 4. Circle this pair and expand the circle to include any “ d ”s.
Solution to Prob 62.• See also prob 74.• . L=YZ+WX·Y+WXZ E=W· Y+L YZ WX 00 00 01
1 1
1 1
1
1
10
YZ WX 00
10
00 01
X
d
11
W
F=WYZ+L
Z 01 11
W
1 Y
Printed; 11/02/04 Modified; February 11, 2004
1
YZ WX 00
10
1 1
00
1
11 10
G=WX+Z+XY
Z 01 11
1 d
1 1 Y
01
X W
11 10
1
Z
01 11
1 1 1 1
10
1 1 1 1 1 X 1 d
20 letters, 27 gate inputs, 11 gates
Y
Department of Electronics, Carleton University © John Knight
Comment on Slide 52
Digital Circuits p. 104
Multiple Output Maps
Maps for 7-Segment Display Driver ,
Maps for 7-Segment Display Driver
,
Minimization Look for half-map circles (one letter terms)
Example: f needs only one AND gate for three circles
These do not require an AND gate. Hence they can always be circled without loss of potential gate sharing. On maps “b” and “c”, circle W is redundant
X Y Z
1
Z
1 1
a Z
W
1 1
X W
1
1 1
d d d d d d 1
Y
b 1
1
1
1
d d d d d d 1
W
e
Y
1 1
1
1 1
X
1 1
1 1 1
d d d d 1 1 d d
W
c
Y
Z
1 X
Z
d d d d 1 1 d d
Z
1
d
1
d d d d 1 1 d d
W
1
f
Z
1
1
W
X
Y
Z
1 1 1
1
d d d d 1 1 d d
W
1
X
1
1
1
d d d d 1 1 d d
W
Y
f
Y
X
g
X
Y
The green (light) circles are repeats of half-map circles. A common error is to a dd the dashed circle W to the “b” map and on the “c” map. They are not needed.
Printed; 11/02/04 Modified; February 11, 2004
Slide 53
Department of Electronics, Carleton University © John Knight
Digital Circuits p. 105
Multiple Output Maps
BCD Display
Maps for 7-Segment Display Driver Minimization (continued) Circles that cover half the map These are representend by a single letter and are particularly good. Since they only contain a single letter, they do not need an AND gate. The input can feed directly into the OR gate. There is no advantage to sharing these terms between maps because there is no hardware to share.
5. Locate all circles which, with “d”s if needed, cover half of a map. There are some ten of them in this example. 6. It is easy to overdo this step Two of these circles cover no “1”s that are not covered by other circles. The only new squares they cover contain “d’s and hence are useless. Remove such circles. The “b” and “c” maps have such useless circles. Z 1 1 W
a 1
1 1
1 W
d d d d 1 d d d
Printed; 11/02/04 Modified; February 11, 2004
Y
1
W
W
e
1
1
1
1
X
Y
Department of Electronics, Carleton University © John Knight
1
d d d d 1 1 d d
W
1 1
X W
1 1
1 1 1
d d d d 1 1 d d
Y Z
b
d d d d 1 d d
Z
1 1 1
Y Z
1 X
1 1
X
d d d d 1 1 d d
Z 1
Z 1 1
c
Y Z 1
1
1
1
d d d d 1 1 d d f
X
Y
1
X W
1
1
1
d d d d 1 1 d d g
X
Y
Comment on Slide 53
Digital Circuits p. 106
Multiple Output Maps
Maps for 7-Segment Display Driver,
Maps for 7-Segment Display Driver , One partner squares.
Z
1
1 1
1 W
Z
1
d d d d 1 1 d d
1
1
1
d d d d d d 1 d
X W
W
b 1
1
1
1
d d d d d d 1 e
Y
1 X
1 1
1 1 1
d d d d 1 1 d d
W
c
Y
X
Y
1 1
1
X
d d d d 1 1 d d
W
X
Z
1 1
1
1
1
d d d d 1 1 d d
W
Y
f
Y
Squares with only one partner : (S ee arr ow s “d ”s don't count as partners.
g
X
Y
)
1 1
Single circle if: • Square is isolated on another map. • Square has a different single partner on another map, and both partners join other circles. Else circle both partners. They are unlikely to be shareable.
1 1
1 1 1 G H 3 AND gates
1 1 1 G H 4 AND gates
1
1
There is no example in the BCD display maps.
Expand circles to include “ d ”s; lighter (blue) circles. Printed; 11/02/04 Modified; February 11, 2004
1 1
Z
1
1
1 1
d d d d 1 1 d d
Z
1 W
X
1
Y
a Z
1 1
Z
Slide 54
Department of Electronics, Carleton University © John Knight
Digital Circuits p. 107
Multiple Output Maps
BCD Display
Display Driver, One Partner Squares Minimization (continued) Squares that have one partner These squares can be encircled with one and only one other square. “ d ” s don’t count as a partner. There are two cases, depending on what is at the same position on the other maps The square matches an isolated square on another map Map “a” has such a square. It can be given a single circle or a double square circle. Looking at map “d” one sees it has to have a single circle. It can do double duty if this term, WXYZ, is given a single circle on each map.(
Z 1 1 W
Z 1 1
1
d d d d 1 1 d d
The pair matches another single partner square. Map “e” has such a square. WXYZ has one possible partner. On all the other maps where WXYZ =1, it has the same partner (maps d and g), or is covered already (maps f and c). This means it is not a likely candidate for a single circle. Circle both partners. Then expand to cover the “ d ”s.
Map “g” has such a square. W ·XYZ has one possible partner. The partner works on map “d”, and “b” has another partner. Circle both partners and expand the circle to cover the “d”s.
a
1
1
X W
Y
1
d d d d 1 d d Z
Z 1
1 1
d d d d 1 d d e
1 1
X W
d d d d 1 d d e
Y
Z
W
Y
1
1
1
d d d d 1 1 d d g
X
Z 1
1
X
Y
d
1
W
1
1
Y
1 1
X W
1
1
1
d d d d 1 1 d d g
X
Y
There is no example in the BCD display where such term should have only a single circle.
Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John Knight
Comment on Slide 54
Digital Circuits p. 108
Multiple Output Maps
Maps for 7-Segment Display Driver,
Maps for 7-Segment Display Driver, Final fill in
1
Uncovered bits identified as “1” Add terms to cover them
1 1
1
a
Z
1 1
W
1
d d d d d d 1 d
Y
e
W
One new term is unique XY
1
The others (K, L) are reused.
W
1
X
Z
W
1
1
1 1
1 W
d d d d d d 1 d
1
W
d d d d d d 1 e
Y
Y
X
W
1
Y
1
1 1
1
1 1
X
1 1
1 1 1
1
c
Y
Y
Z
1 1 1
1
1
1
1
d d d d 1 1 d d
W
Y
f
Y
1
X
d d d d 1 1 d d
W
X
d d d d 1 1 d d
W
1
X
X
Z
Z
L
1
g
d d d d 1 1 d d
W
1
d d d d 1 1 d d
Y
b
1
X
Printed; 11/02/04 Modified; February 11, 2004
1 1
1
1
X
Z
L
1
Z
K
c
1
X
d d d d 1 1 d d
W
d d d d 1 1 d d
Y
a
K
1 1 1
1
f
d d d d 1 1 d d
X
1 1
Y
1 1
Y
1 1
1 1
1
Z
1
1
d d d d 1 1 d d
1
d d d d d d 1
W
1 1
b
1
X
1
Y
1
1
1 1
X
d d d d 1 1 d d
W
3 new AND terms needed 1
1
g
X
Y
Slide 55
Department of Electronics, Carleton University © John Knight
Digital Circuits p. 109
Multiple Output Maps
BCD Display
Display Driver, Final Fill In Minimization (continued) Squares that are left These squares have little chance of sharing by circling a smaller than optimum circle. However keep your eyes open. Example: Assume one did not do maps a, b and c, only d, e, f, and g. Then one would do a two square circle for d, e and f Z 1
If only 4 maps were optimized
1 1
1 W
d d d d 1 d d
X W
e
1 W
1 1
1
d d d d 1 d d Y
W
1
X W
1
1
1
d d d d 1 1 d d
X
Y
g
Z 1 1
1
1 1
X W
Y
1
d d d d 1 1 d d b
L
1
1
1
1
d d d d 1 d d e
Z
1 1 1
X
Y
Department of Electronics, Carleton University © John Knight
W
1 1
X W
1 1
1 1 1
d d d d 1 1 d d c
Y
N
Z
1 X
1
Y
f
Z 1
1
d d d d 1 1 d d
Z
a
Z
X
1 1
Y
d d d d 1 1 d d
L
d
Printed; 11/02/04 Modified; February 11, 2004
W
L
W
1
Z
R
1
1
1
d d d d d d 1
For all seven maps, the largest circles appear to be optimum. However another circling, using smaller circles might still be optimum. K 64.• PROBLEM 1
Find the number of letters, gate inputs and gates.
1
1
Y
d
Reducing the size of L to L=XYZ and adding reusable term R makes all multi-letter terms reusable.
Z
Z 1
Y
Z 1
1
1
1
d d d d 1 1 d d f
Y
X
1
X W
1
1
1
d d d d 1 1 d d g
X
Y
Comment on Slide 55
Digital Circuits p. 110
Multiple Output Maps
Maps for 7-Segment Display Driver,
Maps for 7-Segment Display Driver, Form Equations
Z
Label AND terms with letters
K
If one term covers square replace “1” by letter If several terms cover square leave as “1”.
N W
K
d d d d 1 1 d d a
Z
K
1 J
N W
Z
1 L
X W
X 1 J
Y
b
d d d d d d K d
W
1
L
P
1
d d d d d d K e
Y
Y 1
X W
1 1
Z 1 X
d d d d 1 1 d d c
Y
Z
K X
X
d d d d 1 1 d d
Z
M 1 P
Z
X W
Y
Z
M 1 X X
X
X
d d d d 1 W d d
W
1
P
d d d d W W d d
Y
f
Y
1
g
M = XY
a = J + W+ K + N
e=K+P
K = X·Z
N = XYZ
b = J +L +X
f=L+W+X
L = Y·Z
P = YZ
c=Z+Y+X
g = W + M + P + XY
d=N+M+P+K
Only term not reused.
Size measures Using:
14 gates 38 gate inputs
c=f+Z
35 letters
Printed; 11/02/04 Modified; February 11, 2004
d= e + N + M
14 gates
36 gate inputs Slide 56
Department of Electronics, Carleton University © John Knight
Multiple Output Maps
X
Y
J = YZ
37 letters (literals)
X
Digital Circuits p. 111
Display Drivers, Forming Equations
Display Drivers, Forming Equations One way of forming equations is to put a letter like J,K L ... in the square covered by a circle. The one can write the OR inputs for the equation of the map by writing down the letters. To avoid confusion, leave a 1 in squares which are covered by several circles. All letters must appear at least once, or the circle they represent is redundant. Terms which have only one input like X, do not require a special letter, and we give them the name of the input variable.
It is very hard to find the optimal circling in a problem of this size. These maps show a solution which is suboptimal, but you will probably have difficulty improving without comparing answers. Z Q
W
W
Printed; 11/02/04 Modified; February 11, 2004
W
X W
Q d
The equations.
X
Q
Y
J = YZ
N= XYZ
L = Y· Z
P= YZ
M=XY
Q = X·Y·Z
1 J
X X W
1 X b
J 1 X
Y Y 1 X
Y
Y Y c
P
Q
P
X
X
Q
1
X
X
1
X W
W
a=J+W+Q+M b=J+L+X c=J+Y+X d=N+M+P+Q e=Q+P f=Q+W+X g = W + M + P + X·Y
Department of Electronics, Carleton University © John Knight
Z M 1
X
f
Y
X
Y
Z
W e
Z
1 X L
a Y Z M 1 P
N
M
1 W
Z Q
Z
1 N J
Y
1
P
X
1 W g
Y
14+24 literals = 38 14 gates 16andgateinputs + 23or = 39
Comment on Slide 56
Digital Circuits p. 112
Factoring and Multiplying Out
Two canonical forms
Factoring and Multiplying Out Two canonical forms
c b
a e a c e a d b
These form can represent any Boolean function.
Sum of Products ( Σ of
a
Π)
abc + ae + ace + abd + . . . NAND-NAND logic
Product of Sum ( Π of
Σ)
Dual of
Σ
of
Π NAND
(a+b+c)(a+e)(a+c+e)(a+b+d)( . . . NOR-NOR logic
Factoring transforms Σ of Π
→ Π
of
Σ
Σ
of
Π
(NAND-NAND)
ab + cad → (a + c)(b + a + d)
Multiplying out transforms Π of Σ
→Σ
of
Π
(a + c)(b + a + d)
→
ab + cad
Three Methods of factoring
c
b
a
a e a e c a d b
1. Use the 2nd distributive law x + ab = (x + a)(x + b) 2. Take the dual, multiply out and take the dual again.
NOR
Π
of
Σ
(NOR-NOR)
3. Plot F on a map and use DeMorgan’s Law Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John Knight
Factoring and Multiplying Out
Slide 57
Digital Circuits p. 113
Display Drivers, Forming Equations
Factoring and Multiplying Out Why factor? Often the factored form is about the same complexity as the Σ of Π form, but sometimes it can be much simpler. Example where the factored form has half the letters and just over half the gate inputs. a ·c·d + a·b ·c + abc + acd = (a + c)(b + d)( a + c)
Three methods of factoring Using (D2)
This is the straightforward way, unfortunately it uses the “unfamiliar” distributive law which makes th e algebra harder for many people. Using duality and (D1)
This is algebraically just as difficult as the previous method. However using the more familiar (D1) makes it easier for most people. Using Karnaugh maps
This is quite easy, but is more complex for over five input variables.
Printed; 11/02/04 Modified; February 11, 2004
Department of Electronics, Carleton University © John Knight
Comment on Slide 57
Digital Circuits p. 114