Multiplexer & demultiplexer
Two blocks that move data instead of computing it: pick one of many signals onto a single wire — or send one signal to a chosen destination.
Built from first principles.
Before you start
What you need first
- The design method — reading a function as a Boolean expression.
- Powers of two — n select lines choose among 2n lines.
What you'll be able to do
- Explain a multiplexer (data selector) and write a 2:1 MUX.
- Size the select lines for any MUX (8:1, 16:1…).
- Explain a demultiplexer — the MUX run backwards.
The multiplexer: a data selector
A multiplexer (MUX) has several data inputs, one output, and some select lines. The select value chooses which input is connected to the output — like a rotary switch you can flip electronically.
For a 2:1 MUX with one select line S:
| S | Y |
|---|---|
| 0 | D0 |
| 1 | D1 |
S = 0 enables the D0 term; S = 1 enables the D1 term.
A 4:1 MUX with selects S₁S₀ = 10
Four inputs D0…D3, two selects. The full function is:
With S₁S₀ = 10 (binary 2), only the term S₁S₀′ is 1, so:
10₂ = 2 → D2.The demultiplexer: a MUX in reverse
A demultiplexer (DEMUX) is the opposite: one data input, several outputs, and select lines that choose which output the input is routed to. Every other output stays at 0.
For a 1:2 DEMUX (input D, select S):
When S = 0, D appears on Y0 (and Y1 = 0); when S = 1, D appears on Y1. Same select-line sizing rule: 1-to-2n needs n selects.
✏️ Try it yourself
(a) In one sentence, what does a MUX do? (b) How many select lines does a 16:1 MUX need? (c) For a 4:1 MUX with S₁S₀ = 01, which input reaches Y? (d) Write the two outputs of a 1:2 DEMUX.
Recap — the whole topic on one screen
| Block | Does | Key fact |
|---|---|---|
| MUX | many inputs → one output | 2n inputs need n selects; Y = Σ (select-term · D) |
| DEMUX | one input → many outputs | routes D to the selected output; others 0 |
| Select value | read as binary | = index of the chosen line |