
Decoders
Turns an n-bit code into one active line out of 2ⁿ.
Description
A circuit that activates exactly one of 2ⁿ outputs for each n-bit input. It selects memory rows, devices, or implements arbitrary functions via minterms. AND each output to match one input combination (its minterm).
- Each output corresponds to one minterm of the inputs.
- OR selected outputs to realize any Boolean function directly.
- An enable input gates all outputs off when inactive.
- What: A circuit that activates exactly one of 2ⁿ outputs for each n-bit input.
- Why: It selects memory rows, devices, or implements arbitrary functions via minterms.
- How: AND each output to match one input combination (its minterm).
- Where: Memory address decoding, instruction decode, demultiplexing.
- When: Any time a coded value must select one of many targets.
- Analogy — Like an apartment buzzer panel: you punch a short flat number (the code) and exactly one doorbell rings (one output line). The code picks one of many.
At a glance
What
A circuit that activates exactly one of 2ⁿ outputs for each n-bit input.
Why
It selects memory rows, devices, or implements arbitrary functions via minterms.
How
AND each output to match one input combination (its minterm).
Where
Memory address decoding, instruction decode, demultiplexing.
When
Any time a coded value must select one of many targets.
Think of it like…
Like an apartment buzzer panel: you punch a short flat number (the code) and exactly one doorbell rings (one output line). The code picks one of many.
Minterm generator
- Each output corresponds to one minterm of the inputs.
- OR selected outputs to realize any Boolean function directly.
- An enable input gates all outputs off when inactive.
2-to-4 decoder
| A1 | A0 | Active output |
|---|---|---|
| 0 | 0 | D0 |
| 0 | 1 | D1 |
| 1 | 0 | D2 |
| 1 | 1 | D3 |
Black-box view
Inputs on the left → outputs on the right · particles show signal direction
2-to-4 decoder
▶ live simulatorCode 00 = activates D0 (one-hot).
The 5 Whys
- 1
Why a decoder? To select one target from a coded address.
- 2
Why one-hot outputs? Exactly one device/row should respond.
- 3
Why is it a minterm generator? Each line equals one input combination.
- 4
Why useful for functions? OR the needed minterm lines together.
- 5
Root cause: decoding maps a compact code to explicit, mutually exclusive selections.
Cheat sheet
Working principle
- AND each output to match one input combination (its minterm).
- A circuit that activates exactly one of 2ⁿ outputs for each n-bit input.
Key facts
- Each output corresponds to one minterm of the inputs.
Why it exists
- Root cause: decoding maps a compact code to explicit, mutually exclusive selections.