Author: M Abo Bakar Aslam

Introduction to Encoder and Decoder

An Encoder and Decoder are fundamental digital combinational circuits used in data conversion and communication systems.

These circuits are widely used in digital systems, communication, memory, and control units.

1. Encoder

An Encoder is a combinational circuit that converts 2ⁿ input lines into n output lines.

Key Idea:

It reduces the number of bits by encoding active input into binary form.

Example: 4-to-2 Encoder

Total Outputs = log₂(Number of Inputs)

Properties of Encoder

  1. Number of inputs = 2ⁿ
  2. Number of outputs = n
  3. Performs data compression
  4. Only one input should be active at a time (basic encoder)

Applications of Encoder

  1. Keyboard encoding
  2. Priority encoding in interrupt systems
  3. Data compression in digital circuits

2. Decoder

A Decoder is a combinational circuit that converts n input lines into 2ⁿ output lines.

Key Idea:

It expands binary information into multiple output lines.

Example: 2-to-4 Decoder

Total Outputs = 2^(Number of Inputs)

Properties of Decoder

  1. Number of inputs = n
  2. Number of outputs = 2ⁿ
  3. Only one output is active at a time
  4. Used for selection and addressing

Applications of Decoder

  1. Memory address decoding
  2. Instruction decoding in CPU
  3. Seven segment display systems

3. Encoder vs Decoder

FeatureEncoderDecoder
FunctionMultiple inputs → fewer outputsFewer inputs → multiple outputs
ConversionAnalog/active input → binary codeBinary code → active output
Size Relation2ⁿ → nn → 2ⁿ
OperationCompressionExpansion

4. Important Note

Encoder and Decoder are inverse operations of each other. Encoder reduces data size while Decoder reconstructs the original information.