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
A3A2A1A0Y1Y0
000100
001001
010010
100011

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
Y1Y0A3A2A1A0
000001
010010
100100
111000

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

Combine circuit diagram for both 4-to-2 encoder and 2-to-4 decoder
Figure 1: Combined Circuit Diagram for 4-to-2 Encoder and 2-to-4 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.