- Asked 2/22
- 2079 Bhadra · 1+5 marks
- 2074 Asoj · 1+4 marks
Encoder and octal-to-binary (8-to-3) encoder
Short answer
An encoder converts one active input into its binary code. The 8-to-3 encoder assumes exactly one input high; outputs are A2 = D4+D5+D6+D7, A1 = D2+D3+D6+D7, A0 = D1+D3+D5+D7. D0 is inferred when all outputs are 0; a valid bit resolves the ambiguity.
What is an encoder? Explain 8 to 3 line encoder with circuit diagram and truth table.
An encoder is a combinational circuit that converts an active signal on one of its (or fewer) input lines into an n-bit binary code. It does the reverse of a decoder.
8-to-3 line (octal-to-binary) encoder
It has 8 inputs – (one per octal digit) and 3 outputs . It is assumed that only one input is 1 at any time.
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
| 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 |
| 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 |
Output expressions
Each output is the OR of the inputs whose code has a 1 in that bit:
Circuit diagram
D0 D1 D2 D3 D4 D5 D6 D7
│ │ │ │ │ │ │ │
x │ │ │ ├──┼──┼──┼──[OR]── A2 (D4,D5,D6,D7)
│ ├──┼──┼──┼──┼──┼──[OR]── A1 (D2,D3,D6,D7)
├──┼──┼──┼──┼──┼──┼──[OR]── A0 (D1,D3,D5,D7)
Three 4-input OR gates are enough; is not connected (no output bit is 1 for it).
Limitations
- If no input is active, the output is 000, the same as for ; a valid-output line is needed to tell them apart.
- If two inputs are active together, the output is wrong (e.g. and give , which reads as 7). A priority encoder solves this by encoding only the highest active input.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Octal-to-binary encoder; A+B'C canonical form · Digital Logic, chapter 4
- Octal priority encoder design · Digital Logic, chapter 4 · asked 3×
- Priority encoder and octal priority encoder · Digital Logic, chapter 4 · asked 3×
- Convert octal 623.77 to decimal, binary, hex · Digital Logic, chapter 1
- Gray code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- SR flip-flop diagram, excitation table, equation · Digital Logic, chapter 6
- Encoder; NAND and XOR truth tables · Basic Electronics Engineering, chapter 6
- JK flip-flop operation and truth table · Basic Electronics Engineering, chapter 6
- Stereo FM encoder and decoder block diagram · Communication Systems, chapter 3
- Short note: Trellis diagram of convolutional encoder · Communication Systems, chapter 8