ECE 223 Logic Minimization
ECE 223 Logic Minimization
Logic Minimization
M. Sachdev,
Dept. of Electrical & Computer Engineering University of Waterloo
Example, F1 = xy
y x 0 1
3
yz wx 00 01 11 10
yz wx 00 01 11 10 00 0 0 1 0 01 0 1 1 1 11 1 1 1 0 10 0 0 1 0
00 m0 m4 m12 m8
01 m1 m5 m13 m9
11 m3 m7 m15 m11
10 m2 m6 m14 m10
Clues
Make all possible groups Do we need the group of 4? F4 = wxy +wxy +wyz +wyz
F6 = xz +xy + wyz (SOP) = (w +x)(y +z)(x +z) (POS) One is often simpler than the other Check both
yz wx 00 01 11 10 00 1 0 0 1 01 1 1 0 1 11 0 0 0 0 10 1 0 0 1
wx 00 01 11 10 yz 00 1 0 0 1 01 1 1 0 1 11 0 0 0 0 10 1 0 0 1
8
In these cases, we can choose the output to be wither 0 or 1, whichever simplifies the circuit Example A circuit to produce output 1 if a BCD digit is multiple of 3
BCD Four inputs (wxyz) 0 (0000) Values of wxyz 10 (1010) 9 (1001) 15 (1111) dont care
10
wx 00 01 11 10
00 0 0 X 0
01 0 0 X 1
11 1 0 X X
10 0 1 X X 11
yz wx 00 01 11 10 00 1 0 0 0 01 1 1 X 1 11 0 1 0 0 10 1 1 1 0 wx
yz 00 00 01 11 10 1 0 0 0 01 1 1 X 1 11 0 1 0 0 10 1 1 1 0
Prime implicants
12
Let c = a +b = m4 +m5 +m12 +m13 Adjacent terms differ by a single bit in their representation Tabulation method consists of grouping of minterms and systematically checking for single bit differences
14
15
16
17
18
19
Simplify the function and express it in SOP form Draw a NAND gate for each product term Draw a single gate using AND-invert or invert-OR symbol for the sum term A term with single literal, complement if needed Multi-level NAND Circuits Convert all AND gates to NAND gates Convert all OR gates to NAND gates with invert-OR symbols Balance all bubbles, insert an inverter if needed
20
1. 2. 3.
10
NOR Implementation
NOR gate is a dual of NAND
Same rules and procedures
21
Wired Logic
Two logic gate outputs are not shorted together
May create logical conflicts Logic is not defined
In some technologies, it is possible to short O/Ps of some logic gates (wired logic)
F1 = (AB)(CD) = (AB + CD) (wired AND) F2 = (A +B) + (C +D) = [A +B)(C +D)] (wired OR)
22
11
Exclusive-OR Function
XOR gate is expensive to implement in silicon
XOR = xy +xy XNOR = (xy +xy) = xy +xy
x 0 0 1 1
y 0 1 0 1
XOR 0 1 1 0
XNOR 1 0 0 1
23
Exclusive-OR Function
XOR gate properties
Commutative Associative
24
12
Exclusive-OR Function
4 Variable XOR
25
If we lose a bit in transmission, we can use the parity bit to tell us there has been a problem
26
13
27
14