3/29/09 8:31 PM
Mallard ECE 290: Computer Engineering I - Spring 2009 - HWK #5 Solution
Page 1 of 9
HWK #5 Solution
Problem 5.1
For convenience, let's first write the functions in canonical SOP form and draw the K-maps:
f(x,y,z) = AND(M1,M4,M6) = OR(m0,m2,m3,m5,m7)
g(x,y,z) = OR(m1,m3,m5)
h(x,y,z) = x XOR z = x'z + xz' = OR(m1,m3,m4,m6)
yz
00 01 11 10
x
0
1
0
1
1
0
1
1
0
1
f
yz
00 01 11 10
x
0
0
1
1
0
0
1
0
0
1
g
yz
00 01 11 10
x
0
0
1
1
0
1
0
0
1
1
h
a. With x, y, and z at the inputs of our 3:8 decoder, the decoder generates all 8 minterms. We can then
simply OR the appropriate minterms together to realize each function.
It is easy to implement h(x,y,z) = OR(m1,m3,m4,m6): use a 4-input OR gate.
We only need a 3-input OR gate to implement g(x,y,z) = OR(m1,m3,m5). But we can easily use a 4-
input OR gate by feeding "0" into the 4th OR input (or feed one of the 3 OR-gate inputs into the 4th
input as well).
How would we implement f? We can't use a 4-input OR gate, because f has 5 minterms. But we can
use the NOR gate to implement f
'
= OR(m1,m4,m6) and invert it.
b. Any three-variable function can be implemented with a 4:1 MUX plus an inverter.
We use y and z as the inputs to the select lines of the MUXes. So the only possible MUX data inputs
are 0, 1, x, or x', and a single inverter is needed to compute x'. We can check the K-map to see the
appropriate function to enter in each MUX input.