Digital logic
Multiplexer
Also called: MUX · data selector · select lines
Definition
A multiplexer passes one of several data inputs to a single output, chosen by a binary number on its select lines; 2^k inputs need k select lines.
Picture it
A railway points switch for signals. Processors use multiplexers everywhere: choosing which register feeds the ALU, or whether the next instruction address is PC + 4 or a branch target.
The maths
inputs = 2^k for k select lines 2-to-1: Y = S̄·D0 + S·D1
| Quantity | Unit | Symbol |
|---|---|---|
| ratio | dimensionless | 1 |
Worked example
How many select lines does a 16-input multiplexer need? With select = 1011, which input is passed through?
- 2^4 = 16, so 4 select lines
- 1011 = 11, so input D11
Answer4 select lines; input D11.
✓ The 2 numbers in this answer are recomputed from scratch by an automated test.
Common misconceptions
- Misconception: A multiplexer selects, it does not combine; only one input reaches the output at a time.
- Misconception: A demultiplexer does the reverse: one input to one of several outputs.