Two signals walk into a circuit. A selector decides which one walks out. A ready-made routing circuit you can open in the TorchAnvil simulator.
A multiplexer — "mux" for short — is a traffic director. You feed it several data inputs, plus a selector that says "this one, please," and it forwards exactly that one to the output. This is the smallest version: two inputs, one selector bit, one output.
The whole thing is one formula:
Out = (A AND NOT Sel) OR (B AND Sel)
Read it as two gated paths meeting at an OR:
Sel = 0 (NOT Sel is true).Sel = 1.You could build the same thing with a single Multiplexer component in one node, but wiring it from AND/OR/NOT shows you what's really happening inside.
| A | B | Sel | 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 |
Multiplexers are everywhere. Inside a CPU they pick which register feeds the ALU. In memory they route a read through the right bank. In your graphics card they gate billions of pixel decisions per frame. The 2-to-1 is the atom — wider muxes are just trees of them.