MUX (Multiplexer 2→1)
Inputs
| Pin | Type | Description |
|---|---|---|
| A | bit | First input signal |
| B | bit | Second input signal |
| Sel | bit | Selector: 0 → A, 1 → B |
Outputs
| Pin | Type | Description |
|---|---|---|
| Q | bit | Sel=0 → A, Sel=1 → B |
How It Works
MUX (Multiplexer) is a digital switch. It routes one of two input signals to the output based on the selector bit.
Boolean formula: Q = (A ∧ ¬Sel) ∨ (B ∧ Sel)
Truth Table
| Sel | A | B | Q |
|---|---|---|---|
| 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 |
Usage
Introduced in Level 9. Used for data routing — selecting which signal to pass through. Multiple MUXes can be cascaded to build larger selectors (e.g. 4→1, 8→1).