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.

A0 · tap to flipB0 · tap to flipSel0 · tap to flipOut—
Something has an unconnected input. Every input pin needs a wire before the circuit can run.
ABSelOut
0000·
0010·
0100·
0111·
1001·
1010·
1101·
1111·

Sign in to save your progress. The board works either way.