









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Lecture 9 – Chapter 4.5 to Chapter 4.
ECE 274 - Digital Logic
Some circuits require multiple outputs
Can we create a less expensive circuit by sharing overlapping gates?
a f b
d
g e c
ECE 274 - Digital Logic
a = w’x’y’z’ + w’x’yz’ + w’x’yz + w’xy’z + w’xyz’ + w’xyz + wx’y’z’ + wx’y’z
b = w’x’y’z’ + w’x’y’z + w’x’yz’ + w’x’yz + w’xy’z’ + w’xyz + wx’y’z’ + wx’y’z
w’x’ y’z’ w’x’ yz’ w’x’ yz w’x yz wx’ y’z’ wx’ y’z w’x y’z w’x yz’ w’x’ y’z w’x y’z’
a
b
0 0 1 1
00 01 11 10
0 0
00
01 1 1
1 1 1 0
1 1
11
10 0 0
f2 (^) x3x x1x
We can also use K-maps and share same optimized variables
0 0 1 1
00 01 11 10
0 1
00
01 1 1
1 1 0 0
1 1
11
10 0 0
f1 (^) x3x x1x x x3’ x x x3’ x1’ x x x x
f
f
f1 = x1x3’ + x1’x3 + x2x3’x
f2 = x1x3’ + x1’x3’ + x2x3x
0 0 0 0
00 01 11 10
1 0
00
01 1 1
1 0 1 1
0 1
11
10 0 0
f4 (^) x3x x1x
ECE 274 - Digital Logic
Let’s try another example, same procedure
f3 = x1’x4 + x2x4 + x1’x2x
0 0 0 0
00 01 11 10
1 1
00
01 1 0
1 1 1 0
0 1
11
10 0 0
f3 (^) x3x x1x
f4 = x1x4 + x2’x4 + x1’x2x3x4’
x2’ x x1’ x
f
f
x1’ x x x x
x1’ x x x
x x4’
nothing to combine
ECE 274 - Digital Logic
Using same K-maps, let’s try something different
f3b = x1x2x4 + x1’x2x3x4’ + x1’x
0 0 0 0
00 01 11 10
1 1
00
01 1 0
1 1 1 0
0 1
11
10 0 0
f3 (^) x3x x1x
f4b = x1x2x4 + x1’x2x3x4’ + x2’x
0 0 0 0
00 01 11 10
1 0
00
01 1 1
1 0 1 1
0 1
11
10 0 0
f4 (^) x3x x1x
x2’ x
f
f
x1’ x
x
x1’ x
x x
x x4’
we could also group x2x3’x4’ – but it would increase implementation cost (try it out)
Solution : Multilevel logic expression
How do we synthesize multilevel circuits?
e f g
a b c d
f3 = (ab + cd) + efg
f
f4 = x1x4 + x2’x4 + x1’x2x
x2’ x x2’ x
x x
x x
f
ECE 274 - Digital Logic
We can take advantage of distributive property
Assume we can have a maximum fan-in of 2
12a. x · (y + z) = xy + xz 12b. x + y · z = (x+y) · (x+z)
out = af’c + af’de + bgc + bgde
out
af’
af’ c
ed
bg
bg c
ed
f = af’c + af’de + bgc + bgde f = af’(c + de) + bg(c + de) f = (af’ + bg)(c + de)
f = (af’ + bg)(c + de)
c d e
b g
a f’
f
ECE 274 - Digital Logic
Implement F = x1x2’x3x4’x5x6 + x1x2x3’x4’x5’x
F = x1x2’x3x4’x5x6 + x1x2x3’x4’x5’x
F
x4’ x
x1x2’ x
x
x4’ x5’
x1x x3’
x
f = x1x2’x3x4’x5x6 + x1x2x3’x4’x5’x
f = x1x4’x6(x2’x3x5 + x2x3’x5’)
f = x1x4’x6(x2’x3x5 + x2x3’x5’)
f
x2’ x x x x3’ x5’ x x4’ x
Four inputs x1, x2, x3, x
Output f1 must be 1 when At least one of the inputs x1 and x2 is equal to 1 and both x3 and x4 are equal to 1 x1 and x2 are equal to 0 and either x3 or x4 is equal to 1
All other cases f1 is 0
Output f2 is 1 in all cases, except x1 and x2 are equal to 0, or when both x3 and x4 are equal to 0
f1= (x1+x2)x3x4 + x1’x2’(x3+x4) f2’= x1’x2’ + x3’x4’
f1= x3x4 + x1’x2’(x3+ x4)
f2’’= (x1’x2’ + x3’x4’)’
Simplification f2= (x1 +x2)(x3 + x4)
DeMorgan’s Law
ECE 274 - Digital Logic
f1= x3x4 + x1’x2’(x3+ x4) f2= (x1 +x2)(x3 + x4)
f1= x3x4 + (x1+x2)’(x3+ x4) DeMorgan’s Lawx1’x2’ = (x1 + x2)’
x x
x x f
f
We can share (x3 + x4) We can share (x1 + x2)
ECE 274 - Digital Logic
Solution : Multilevel logic expression
How do we synthesize multilevel circuits?
e f g
a b c d
f3 = (ab + cd) + efg
f
f4 = x1x4 + x2’x4 + x1’x2x
x2’ x x2’ x
x x
x x
f
replace two-level logic equation with two or more new expressions which are then combined to define multilevel circuit
Example 2 cont’
ab
cd 00 01 11 10 00
01
ab
cd 00 01 11 10 00
01
e = 0 e = 1
What about these 1s?
F 2 = c’d’e’(a’b’ + ab)
F 2 = (e + c + d)’(a’b + ab’)’
c’d’e’ = (e+c+d) DeMorgan’s Law (a’b’ + ab) = (a’b + ab’)’ Shown in example1, step 3
ECE 274 - Digital Logic
Example 2 cont’
ab
cd 00 01 11 10 00
01
ab
cd 00 01 11 10 00
01
e = 0 e = 1
To cover all 1’s combine F 1 and F (^2)
F 2 = (e + c + d)(a’b + ab’) + (e + c + d)’(a’b’ + ab)’
Assume g = (e + c + d) k = (a’b + ab’)
ECE 274 - Digital Logic
How did we do?
F = x1x3’x4 + x1x3x4’ + x2x3’x4 + x2x3x4’ + x3’x4x5 + x3x4’x5 + x1’x2’x3’x4’x5’ + x1’x2’x3x4x5’
F = kg + k’g’ g = e + c + d k = a’b + ab’ (^) cost = 9 + 36 = 45
fan-in = 8 delay = 2 gate-delay
cost = 7 + 15 = 22 fan-in = 3 delay = 4 gate-delay
Similar to OR gate, except outputs 0 when both inputs are 1 True whenever an odd number of inputs is true
Inversion bubble on output to represent the complement output signal XNOR is the opposite output from XOR, thus true whenever even number of true inputs
a b F 0 1 0 1
x x
(x1 + x2)’
a b F 0 1 0 1
x x
(x1 + x2)’
a b F 0 1 0 1
x x
(x1 + x2)’
F = ab’ + a’b
F
a
b
F = (a’ + b)’ + (a + b’)’
F = ((a’ + b) · (a + b’))’
F = ((a · b’)’ · (a’ · b)’)’
F
a
b
F
a
b
F = ((a · b’)’ · (a’ · b)’)’
(a · b’)’ = (a · b’ + 0)’
= (a · b’ + a · a’)’
= (a · (b’ + a’))’
= (a · (a’ + b’))’
= (a · (a · b)’)’
(a’ · b)’ = (a’ · b + 0)’
= (a’ · b + b · b’)’
= (b · (a’ + b’))’
= (b · (a · b)’)’
We found a common term! g = (a · b)’
Convert to NAND-gate circuit
x x x
x x
x
x
x x
x
x x
x
x
x x
x x
DeMorgan’s Theorem
x x
x x
Truth table def.
ECE 274 - Digital Logic
Convert same initial circuit to NOR-
gate circuit
x x x
x x
x
x
DeMorgan’s Theorem x x
x x
x x x
x x
x
x
ECE 274 - Digital Logic
Convert same initial circuit to NOR-
gate circuit
DeMorgan’s Theorem x x
x x
x x x
x x
x
x
x x x
x x
x
x
We’ve shown how to create various multilevel circuit
Given a multilevel circuit, can we determine what function it implements?
F = ((a · b’)’ · (a’ · b)’)’
F
a
b
F = (x1’x2 + x1x2’)gx3 + (x1’x2 + x1x2’)’x
x
x
x x2’
x1’ x f
ECE 274 - Digital Logic
Determine function implemented by multilevel circuit below
x x x
x x
x
x
P
P1 = x2x
P
P2 = x5 + x P3 P3 = x1 + P1 = x1 + x2x
P
P4 = x4P2 = x4(x5 + x6)
P
P5 = P4 + x7 = x4(x5 + x6) + x
= (x1 + x2x3)(x4(x5 + x6) + x7) = (x1 + x2x3)(x4x5 + x4x6 + x7) = x1x4x5 + x1x4x6 + x1x7 + x2x3x4x5 + x2x3x4x6 + x2x3x
ECE 274 - Digital Logic
Determine function implemented by multilevel circuit
x5 F
x x
x
x
P
P1 = (x1x2)’
P
P2 = (P1x3)’
P
P3 = (P2x4)’
F = (P3x5)’
x x
x x
DeMorgan’s Theorem
= P3’ + x5’ = (P2x4)’’ + x5’ = P2x4 + x5’ = (P1x3)’x4 + x5’ = (P1’ + x3’)x4 + x5’ = P1’x4 + x3’x4 + x5’ = (x1x2)’’x4 + x3’x4 + x5’ = x1x2x4 + x3’x4 + x5’
Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1
b
a 00 10
Four corners are vertices , correspond to four rows of truth table
horizontal coordinate corresponds to a variable vertical coordinate corresponds to b variable
Each vertex has two coordinates
a = 0, b = 1
ECE 274 - Digital Logic
Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1
b
a 00 10
Map function onto cube by indicating with blue circles those vertices for which F = 1
Express function as a set of vertices F = {01, 10, 11}
ECE 274 - Digital Logic
Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1
b
a 00 10
Notice vertices only differ by one variable
Edge joins two vertices (where F=1) differ in value by one variable
1x
x
x denotes variable can be 1 or 0 single edge denotes combining property (14a) xy’ + xy = x
Two-dimensional cube a b F 0 0 0 0 1 1 1 0 1 1 1 1
b
a 00 10
1x
x
denotes a
denotes b
Edges x1 and 1x fully define the function f = {1x, x1}
Corresponds to f = a + b
ECE 274 - Digital Logic
Three-dimensional cube
b
a
Eight corners are vertices , correspond to eight rows of truth table
Each vertex has three coordinates
c 000 100
a b c F 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0
ECE 274 - Digital Logic
Three-dimensional cube
Map function on cube with blue vertices
a b c F 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 0
b
a
c 000 100