- 2076 Asoj · 2+3 marks
De Morgan's laws; XOR using 3-input NAND
Short answer
De Morgan's laws: ¬(A+B)=¬A·¬B, ¬(A·B)=¬A+¬B; extended, ¬(A+B+C)=¬A¬B¬C. XOR using four 3-input NAND gates: tie one unused input of each gate to logic 1, then use the standard 4-gate XOR configuration to produce A⊕B.
Describe De' Morgan's laws with examples. Construct XOR gate using only 3-inputs NAND gates.
De Morgan's laws
First theorem: the complement of a sum (OR) of variables equals the product (AND) of their complements.
Second theorem: the complement of a product (AND) of variables equals the sum (OR) of their complements.
In words: "break the bar and change the sign".
Examples
- and (extended to 3 variables).
- .
- Check with A = 1, B = 0: and .
XOR gate using only 3-input NAND gates
A 3-input NAND gives . If one input is tied to logic 1 (HIGH, e.g. +5 V through a resistor), it behaves as a 2-input NAND: . (Tying the unused input to one of the used inputs also works, since .) So the 4-NAND XOR circuit is built with four 3-input NAND gates:
A --+-------------[NAND3 G2]--+
| | 1 -->|
+--[NAND3 G1]---+ +--[NAND3 G4]-- Y
| 1 -->| | | 1 -->|
B --+-------------[NAND3 G3]--+
1 -->|
(1 --> : third input tied to logic HIGH)
| A | B | 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 |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- De Morgan's laws; XOR from NAND gates · Digital Logic, chapter 2
- De Morgan; NOR gate from NAND gates · Digital Logic, chapter 2
- 3-input XOR using NAND gates only · Digital Logic, chapter 2 · asked 2×
- Prove De Morgan's theorems; XOR using NAND · Digital Logic, chapter 2 · asked 3×
- De Morgan's laws; XNOR using NOR gates · Digital Logic, chapter 2
- XOR gate using minimum NAND gates · Digital Logic, chapter 2 · asked 2×
- X-OR gate using NAND gates only · Basic Electronics Engineering, chapter 6