DE Notes
Complete guide to multiplexer: 2:1, 4:1, 8:1 MUX truth tables, Boolean expressions, logic diagrams, IC 74151, function implementation using MUX, and Verilog code.
What is a Multiplexer?
A multiplexer (MUX) is a combinational circuit that selects one of 2ⁿ input lines and routes it to a single output based on n select lines.
Also called: Data Selector (it selects which data input to pass to output).
4:1 MUX
Truth Table:
| S1 | S0 | Y |
|---|---|---|
| 0 | 0 | I0 |
| 0 | 1 | I1 |
| 1 | 0 | I2 |
| 1 | 1 | I3 |
Boolean expression:
8:1 MUX — IC 74151
The 74151 is a standard 8:1 multiplexer IC:
Truth Table (partial):
| Ē | S2 | S1 | S0 | Y |
|---|---|---|---|---|
| 1 | X | X | X | 0 |
| 0 | 0 | 0 | 0 | D0 |
| 0 | 0 | 0 | 1 | D1 |
| 0 | 0 | 1 | 0 | D2 |
| 0 | 0 | 1 | 1 | D3 |
| 0 | 1 | 0 | 0 | D4 |
| 0 | 1 | 0 | 1 | D5 |
| 0 | 1 | 1 | 0 | D6 |
| 0 | 1 | 1 | 1 | D7 |
Implementing Boolean Functions Using MUX
A 2ⁿ:1 MUX can implement any n-variable Boolean function by connecting the truth table outputs to data inputs.
Example: Implement F(A,B,C) = Σm(1,2,4,7) using 8:1 MUX
| Minterm Value | Data input |
| m0 (000): F=0 | D0 = 0 |
| m1 (001): F=1 | D1 = 1 |
| m2 (010): F=1 | D2 = 1 |
| m3 (011): F=0 | D3 = 0 |
| m4 (100): F=1 | D4 = 1 |
| m5 (101): F=0 | D5 = 0 |
| m6 (110): F=0 | D6 = 0 |
| m7 (111): F=1 | D7 = 1 |
Optimization: Use a 4:1 MUX (with 2 select variables) and the 3rd variable on data inputs:
Use A, B as selects → group minterms by A,B:
- AB=00: F = C (D0=C)
- AB=01: F = C̄ (D1=C̄)
- AB=10: F = C̄ (D2=C̄) — Wait: m4(100)=1, m5(101)=0 → D2=C̄
- AB=11: F = C (D3=C) — m6(110)=0, m7(111)=1 → D3=C
Result: 4:1 MUX with D0=C, D1=C̄, D2=C̄, D3=C
Expanding MUX
Build 16:1 MUX from two 8:1 MUX:
| D0-D7 ─┤ 8 | 1 ├── Y0 ──┐ |
| │ MUX │ ├──[2 | 1 MUX]── Y |
| D8-D15 ─┤ 8 | 1 ├── Y1 ──┘ |
Verilog
Interview Questions
Q1: How many select lines does a 16:1 MUX need? log₂(16) = 4 select lines. Generally, a 2ⁿ:1 MUX needs n select lines.
Q2: What is the difference between a MUX and a decoder? A MUX selects one of multiple data inputs and routes it to a single output — it's a data selector. A decoder takes an n-bit code and activates exactly one of 2ⁿ output lines — it converts a binary code to one-hot format. MUX has data and select inputs; decoder has only address inputs.
Q3: Can any Boolean function of n variables be implemented with a 2ⁿ:1 MUX? Yes. Connect the n variables to the select lines. Each data input corresponds to one minterm. Tie each data input to 0 or 1 based on whether that minterm is in the function. A 2ⁿ:1 MUX is a universal logic element for n-variable functions.
Q4: How do you implement a 4-variable function using a 8:1 MUX? Use 3 variables as select lines. For the 4th variable (say D), express the function for each select combination in terms of D: the result is D, D̄, 0, or 1 for each data input. Connect data inputs accordingly. This is more efficient than a 16:1 MUX.
Q5: What is a tree multiplexer? A tree MUX is built by cascading smaller MUXes. For example, a 16:1 MUX can be built from 9 2:1 MUXes arranged in 4 levels, or from two 8:1 MUXes and one 2:1 MUX. The tree structure balances delay versus hardware.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Multiplexer (MUX) — Working, Truth Table, IC 74151 and Applications.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Digital Electronics topic.
Search Terms
digital-electronics, digital electronics, digital, electronics, combinational, circuits, multiplexer, multiplexer (mux) — working, truth table, ic 74151 and applications
Related Digital Electronics Topics