LearnYourBasics

Spread your knowledge

Encoders are the opposite of decoders. Instead of expanding a binary code into many lines, they compress several input lines into a shorter binary output code.

Encoders are core combinational circuits that convert multiple input lines into a compact binary code at the output. They are used whenever a digital system needs to know which one of many lines is active and represent that information as an n-bit binary number.

What is an encoder ?

An encoder is a combinational logic circuit that converts up to 2n input lines into an -bit binary output code, assuming only one input is active at a time.

In simple terms, it encodes the position of the active input line into a binary number on the outputs. For example:

  • 4‑to‑2 encoder has 4 inputs (D₀–D₃) and 2 outputs (Y₁Y₀).

  • An 8‑to‑3 encoder has 8 inputs (D₀–D₇) and 3 outputs (Y₂Y₁Y₀).

Key properties

  • Typically 2n inputs and  outputs in a simple binary encoder.

  • Inputs usually active‑HIGH (logic 1 means “selected”).
  • Output represents the index of the active input in binary.
Block Diagram - Encoder

Functions and Purpose of an Encoder

Encoders perform three main roles:

  1. Code conversion: Convert a one‑hot or decimal‑like input into binary code.
  2. Data compression: Replace many wires (parallel signals) with fewer binary lines.
  3. Source identification: Indicate which device, key, or sensor is active.

This is the opposite of a decoder, which takes binary and activates one of many lines.

8:3 Encoder

A 8:3 encoder has 8 inputs and 3 outputs. It accepts eight inputs and produces 3 bit output code, corresponding to the activated input. It is also known as Octal to Binary Encoder.

8:3 Encoder Block Diagram

Working of a 8‑to‑3 Binary Encoder

An 8‑to‑3 encoder has inputs D0–D7 and outputs Y2,Y1,Y0. If only one input is HIGH, then

  • D₀ = 1 → 000

  • D₁ = 1 → 001

  • D₂ = 1 → 010

  • D₃ = 1 → 011

  • D₄ = 1 → 100

  • D₅ = 1 → 101

  • D₆ = 1 → 110

  • D₇ = 1 → 111

Truth Table - 8:3 Encoder
8:3 Logic Diagram

Logical Expressions for Y2 , Y1 , Y0 are :-

Y2 = D4 + D5 + D6 + D7

Y1 = D2 + D3 + D6 + D7

Y0 = D1 + D3 + D5 + D7

Leave a Comment

You must be logged in to post a comment.
Scroll to Top