Build a CPU
Step 5 of 9
Multiplexer
How a machine chooses
A processor spends most of its time choosing: this value or that one, the ALU result or something from memory. A multiplexer is that choice, made out of gates.
Two data inputs, one selector. When the selector is off, A comes out. When it is on, B does.
Every control signal you meet later is ultimately steering one of these.
This step builds on the ones before it, and will make a lot more sense after them. Go to Logic gates
Tap a part to add it. Tap an output pin, then the part it feeds. Tap a switch to flip it.
Something has an unconnected input. Every input pin needs a wire before the circuit can run.
| 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· |
Sign in to save your progress. The board works either way.