Similar questions 6 more →
Boolean Algebra & Logic Gates


Shared context
Part (a) implements f(x,y,z) = xy′ + yz′ with one complement. Part (b) independently converts a drawn three-AND/two-OR circuit to exactly six two-input NAND gates.
Answer & solution
Answer: Six two-input NAND gates with netlist N1…N6 below (no official key was published)
1. Identify the source circuit by its connections. The top, middle, and bottom two-input AND gates feed a cascade of two OR gates: the first OR combines the top two branches, and the second combines that result with the bottom branch. Label the six external wires a,b,c,d,e,f from top to bottom. These are local wire labels, not extra assumptions about their values.
2. Transform the first AND–OR section by bubble-pushing. A NAND is an AND with a complemented output. Replace the top and middle AND gates with NAND gates N1 and N2. Replace the OR they feed with NAND N4, whose effective input complements cancel those two output complements. Thus N4 has the same output as that original OR.
3. Transform the final OR in the same way. Its bottom input is supplied in complemented form by replacing the bottom AND with NAND N3. Its other input must be the complement of N4’s output, which is produced by NAND N5 with both input pins tied to N4. NAND N6 then implements the final OR through De Morgan’s law.
4. Draw and connect the complete six-gate replacement:
N1 = NAND(a,b)
N2 = NAND(c,d)
N3 = NAND(e,f)
N4 = NAND(N1,N2)
N5 = NAND(N4,N4)
Y = N6 = NAND(N5,N3)
a,b ---> N1 --\
N4 ---> N5 (both inputs tied) --\
c,d ---> N2 --/ N6 ---> Y
e,f ---> N3 -----------------------------------/
5. Check the physical restrictions. Gates N1–N6 are all two-input NAND gates. Tying the two inputs of N5 together implements an inverter and still uses one allowed two-input NAND gate. There are exactly six gates, no hidden NOT gates and no three-input gates. This is a local circuit transformation, without first expressing the original switching function. A separate exhaustive simulation over the 64 external input assignments confirms equivalence.