2-to-1 Multiplexer
A multiplexer is a switch made of gates: a select input chooses which of the data inputs reaches the output. A 2-to-1 multiplexer passes A when the select line C is 0, and B when it is 1.
Try it live
This is the Circuit Simulator itself, running in the page — it is LogicsBench's own example design, read-only. Open it full size, and sign in to make your own copy to change.
- Set A to 1 and B to 0, then flip C: the output follows whichever input is selected.
- Watch the truth table: with C fixed, Out simply copies one input.
2-to-1 multiplexer truth table
| A | B | C | Out |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
How it works
Out = A·C′ + B·C
One AND gate lets A through when C is 0 (it reads C′), the other lets B through when C is 1; an OR gate joins them.
Only one of the two AND gates can be on at a time, so the OR never mixes A and B.
Four of these sharing one select line is a 74LS157 — how a circuit switches a whole 4-bit number between two sources.