ITPEC FE Morning April 2023 Question 21
ITPEC FE Morning April 2023 — Question 21 of 80
XOR from NAND gates — recognize the classic 4-NAND XOR construction.
Circuit (all 4 gates are NAND):
- P = NAND(A, B)
- Q = NAND(A, P)
- R = NAND(B, P)
- Y = NAND(Q, R)
Truth table verification:
| A | B | P | Q | R | Y |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 | 0 |
| 0 | 1 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 | 1 | 0 |
Result: equivalent to XOR(A, B)
Answer: c)
Why not others:
- (a) AND — outputs 1 only when both inputs are 1
- (b) OR — outputs 1 when either or both inputs are 1
- (d) NOR — outputs 1 only when both inputs are 0
Key rule: 4 NAND gates arranged this way is the classic XOR construction. Memorize the pattern: first NAND feeds into two parallel NANDs, whose outputs feed into a final NAND.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.