Understanding Decoders: Types, Truth Tables, and Practical Applications
A decoder is a logic circuit that transforms a binary code into a set of output signals. While it performs the inverse operation of an encoder, decoders are typically simpler to design and provide a solid foundation for learning about binary logic circuits.
Types of Decoders
Line Decoder
The most common decoder is the line decoder, which takes an n-bit binary address and activates one of 2n output lines. The simplest example is the 1‑to‑2 line decoder. Its truth table is shown below.
| A (Address) | D1 | D0 |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 1 | 0 |
Here, D0 = NOT A and D1 = A. The circuit diagram is illustrated below.


2‑to‑4 Line Decoder
Building on the 1‑to‑2 decoder, the 2‑to‑4 line decoder is only slightly more involved. Its truth table is:
| A1 | A0 | D3 | D2 | D1 | D0 |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 0 | 0 |
The resulting logic network is displayed below.


Scaling Up: Larger Line Decoders
More extensive decoders can be built hierarchically by combining smaller units. For instance, a 3‑to‑8 line decoder can be assembled from a 1‑to‑2 and a 2‑to‑4 decoder, while a 4‑to‑16 line decoder can be constructed using two 2‑to‑4 blocks. An alternative 2‑to‑4 implementation that replaces the 1‑to‑2 sub‑circuits with their own internal logic is shown below:

Similarly, ladder‑style arrangements of 1‑to‑2 decoders can produce a 2‑to‑4 decoder. Such hierarchical designs are common when creating more complex logic functions or when integrating decoders into larger digital systems.
In many practical scenarios, a line decoder is used to select one device out of many. For example, a system that can address 16 peripheral devices would require 16 dedicated control lines if done manually. With a 4‑to‑16 decoder, the same selection can be achieved with just four address lines, dramatically simplifying the hardware.
RELATED WORKSHEET:
- Encoders and Decoders Worksheet
Industrial Technology
- Finite-Length Transmission Lines: Impedance, Reflections, and Termination
- Impedance Transformation with Transmission Lines: Matching Techniques Using Standing Waves
- Mastering C# Comments: Types, Best Practices, and XML Documentation
- Understanding Line Efficiency: Key Metrics for PCB Production
- Understanding Production Lines: How Assembly Lines Drive Manufacturing Efficiency
- What Are Building Lines? A Clear Guide for Property Owners
- Understanding the Assembly Line: How Interchangeable Parts Drive Efficient Production
- Understanding PCB Transmission Lines: Design, Function, and Applications
- GD&T Explained: Profile of a Line vs. Profile of a Surface
- Streamlined Powder Coating Lines: Efficient, Durable, High-Quality Finishes