- 2070 Bhadra · 2 marks
X-OR gate using NAND gates only
Short answer
Use four 2-input NAND gates. N1 = NAND(A,B); N2 = NAND(A, N1); N3 = NAND(B, N1); N4 = NAND(N2,N3) yields A XOR B.
Draw the circuit of X-OR gate using NAND gates only.
The XOR function is Y = A⊕B = A'B + AB' and is built from four 2-input NAND gates.
A ---+------------------[N2]---+
| +--------/ |
+--[N1]--+ [N4]--- Y
| +--------\ |
B ---+------------------[N3]---+
(N1 takes A and B; its output goes to both N2 and N3. N2 also takes A, and N3 also takes B.)
- N1 = NAND(A, B) = (AB)'
- N2 = NAND(A, N1) = (A·(AB)')' = (A·(A' + B'))' = (AB')'
- N3 = NAND(B, N1) = (B·(AB)')' = (A'B)'
- N4 = NAND(N2, N3) = ((AB')' · (A'B)')' = AB' + A'B = A⊕B
Check by truth table: for A = 1, B = 0: N1 = 1, N2 = (1·1)' = 0, N3 = (0·1)' = 1, Y = (0·1)' = 1. For A = B = 1: N1 = 0, N2 = N3 = 1, Y = (1·1)' = 0.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- K-map with don't cares, NAND only · Basic Electronics Engineering, chapter 6
- Why NOR and NAND are universal gates · Basic Electronics Engineering, chapter 6
- Encoder; NAND and XOR truth tables · Basic Electronics Engineering, chapter 6
- XOR gate using minimum NAND gates · Digital Logic, chapter 2 · asked 2×
- 3-input XOR using NAND gates only · Digital Logic, chapter 2 · asked 2×
- De Morgan; NOR gate from NAND gates · Digital Logic, chapter 2
- Universal gates; Ex-OR using NAND · Digital Logic, chapter 2