Author: M Abo Bakar Aslam
4-to-2 Lines Encoder and 2-to-4 Lines Decoder
A 4-to-2 lines Encoder and 2-to-4 lines Decoder are commonly used combinational circuits for data encoding and decoding in digital systems.
1. Truth Table - 4-to-2 Lines Encoder
Suppose inputs are A0, A1, A2 and A3 and outputs are Y1 and Y0.
Total Number of Rows = 2^(number of inputs) = 2⁴ = 16
| A3 | A2 | A1 | A0 | 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 |
2. Boolean Expression - 4-to-2 Lines Encoder
Y1 = A2 + A3
Y0 = A1 + A3
3. Truth Table - 2-to-4 Lines Decoder
Suppose inputs are Y1 and Y0 and outputs are A0, A1, A2 and A3.
Total Number of Rows = 2^(number of inputs) = 2² = 4
| Y1 | Y0 | A3 | A2 | A1 | A0 |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 |
4. Boolean Expression - 2-to-4 Lines Decoder
A0 = Y1' Y0'
A1 = Y1' Y0
A2 = Y1 Y0'
A3 = Y1 Y0
5. Circuit Diagram - Encoder and Decoder

Important Note
In basic encoders, only one input should be active at a time. If multiple inputs are active, the output may become ambiguous. This issue is solved using priority encoders.