- 2069 Bhadra · 2+2 marks
Encoder; NAND and XOR truth tables
Short answer
An encoder converts 2ⁿ input lines to an n-bit binary code, only one input active at a time. NAND gate output is (AB)' : 1,1,1,0 for inputs 00,01,10,11. XOR gate output is A⊕B: 0,1,1,0 for those inputs.
Define encoder. Draw truth tables of NAND and XOR gates.
Encoder
An encoder is a combinational circuit that converts up to 2ⁿ input lines into an n-bit binary code at the output. Only one input is active at a time, and the output is the binary code of that input. Examples: an 8-to-3 encoder, or a decimal-to-BCD encoder (10 inputs, 4 outputs). It does the opposite of a decoder.
| I3 | I2 | I1 | I0 | Y1 | Y0 |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 1 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 |
(4-to-2 encoder: Y1 = I3 + I2, Y0 = I3 + I1.)
Truth table of NAND gate (Y = (AB)')
| A | B | Y |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Truth table of XOR gate (Y = A⊕B = A'B + AB')
| A | B | Y |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- X-OR gate using NAND gates only · Basic Electronics Engineering, chapter 6
- Why NOR and NAND are universal gates · 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's laws; XOR from NAND gates · Digital Logic, chapter 2
- Prove De Morgan's theorems; XOR using NAND · Digital Logic, chapter 2 · asked 3×