Multiplexer
A 2-to-1 multiplexer is a switch for signals: when its select input S is off, the output follows A, and when S is on, it follows B. It's two AND gates, a NOT and an OR, and it's how a computer chooses which value goes where.
How it works
- 01
S off: the NOT turns it into a 1 for the top AND, so A gets through and B is blocked.
- 02
S on: the bottom AND lets B through, and the top one blocks A.
- 03
The OR passes whichever one got through.
Truth table
- Out = A·S' + B·S
| S | A | B | Out |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 1 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 |