Choosing which wire wins
08Multiplexers
- Stage 1
- Stage 2
- Stage 3
- Stage 4
- Stage 5
- Stage 6
- Stage 7
- Stage 8 (this one)
- Stage 9
- Stage 10
- Stage 11
- Stage 12
- Stage 13
- Stage 14
- Stage 15
Explanation
A multiplexer (mux) is a switch made of gates: select bits choose which data input reaches the output. A 2:1 mux is Y = (A · ¬S) + (B · S). A 4:1 mux uses two select bits to pick one of four inputs.
Processors are full of muxes. One chooses whether the ALU's second input comes from a register or from memory; another chooses whether the program counter takes PC + 1 or a jump address.
Flip the inputs and follow the signal
S
A
B
Y = 0
S = 0 lets A through; S = 1 lets B through.
Check yourself
Marked instantly in your browser. Use the interactive above to work it out.