I'm designing a 8421 BCD to 84-2-1 BCD converter circuit. The truth table is:
Decimal | ABCD | WXYZ
0 | 0000 | 0000
1 | 0001 | 0111
2 | 0010 | 0100
. .
. .
. .
9 | 1001 | 1111
Everything after decimal 9 is a don't care. I started by creating Karnaugh maps for each W, X, Y, Z
. From the Karnaugh maps, I found the following equations:
W = (A)(~B)(~C) + (~A)(B)(C+D)
X = (~A)(~C)(~D) + (~A)(~B) + (~B)(D)
Y = (~C)(D)([~A]+[~B]) + (~A)(C)(~D)
Z = (D)([~A]+[~B][~C])
Where multiplication means AND, addition means OR, and ~ means NOT. I'm unsure of how draw a circuit with the appropriate logic gates from here. Do I create a circuit for each letter and then AND all of the outputs together? Do I combine all of the expressions (as in W+X+Y+Z or WXYZ) and simplify the expressions from there, then create a circuit using the new simplified expression? I'm not really interested in what this particular circuit will actually look like, I'm trying to find tackle the more general concept of moving from truth tables to circuit schematics.
Best Answer
No. What the equations show you are how to derive outputs for four separate pins. If you wanted to combine the four pins you should have done it earlier when coming up with the Karnaugh map (the Karnaugh map would then only have one output instead of four).
First step, treat the four as four separate circuits:
Second step, join
A
toA
,B
toB
etc.. This is obvious because obviouslyA
is the same asA
etc.The circuit should be working at this point but if you're paying attention you may notice that some parts of the
W
andZ
circuits are sharing the same logic. For example, we're usingNOT
onB
andC
twice. The next (optional) step is to refactor the circuit and remove redundant/repeated subcircuits and components: