COMBINATIONAL DIGITAL LOGIC
Multiplexers in Digital Logic (Complete Study Guide)
A multiplexer (MUX) is a combinational circuit that selects one signal from several available inputs and forwards the selected signal to one output. The number of select lines depends on the number of inputs: an MUX with \(2^n\) inputs needs \(n\) select lines.
- Multiplexers are also known as "N-to-1 selectors", parallel-to-serial converters, many-to-one circuits, and universal logic circuits.
- They are mainly used to increase the amount of data that can be sent over a network within a certain amount of time and bandwidth.
1. Types of Multiplexers
Multiplexers are classified based on the number of data input channels:
2. 2x1 Multiplexer
The 2x1 MUX is a fundamental circuit also known as a 2-to-1 multiplexer used to choose one signal from two inputs and transmit it to the single output line. It has two input lines (\(I_0, I_1\)), one output line (\(Y\)), and a single selection line (\(S_0\)).
Truth Table of 2:1 MUX
| Select Line (\(S_0\)) | Selected Output (\(Y\)) |
|---|---|
| 0 (LOW) | \(I_0\) |
| 1 (HIGH) | \(I_1\) |
Logical Expression of 2x1 MUX
Using the Truth Table, the logical expression for the 2:1 MUX is:
Circuit Diagram of 2x1 Multiplexer
3. 4x1 Multiplexer
A 4x1 MUX provides four possible data inputs and uses two select lines to determine which input reaches the output. Therefore, it has \(I_0\) through \(I_3\) as data inputs, \(S_1,S_0\) as control lines, and \(Y\) as the output. Since \(2^2=4\), two select lines are sufficient.
Truth Table of 4x1 MUX
| \(S_1\) (MSB) | \(S_0\) (LSB) | Output (\(Y\)) |
|---|---|---|
| 0 | 0 | \(I_0\) |
| 0 | 1 | \(I_1\) |
| 1 | 0 | \(I_2\) |
| 1 | 1 | \(I_3\) |
Logical Expression of 4x1 MUX
The circuit uses 4 three-input AND gates, 2 NOT gates, and 1 four-input OR gate.
4:1 MUX — Block Diagram
4:1 MUX — Logic Circuit
4. Implementation of Different Logic Gates with 2:1 Mux
A multiplexer can also be used as a building block for Boolean logic. By choosing suitable values for the data inputs and select line, common logic functions can be realized with 2:1 MUX units:
Visual Implementations Using 2:1 MUX
1. NOT Gate using 2:1 Mux
Connect input \(A\) to select line \(S_0\). Connect \(I_0 = 1\) and \(I_1 = 0\).
2. AND Gate using 2:1 Mux
Connect \(X\) to select line \(S_0\), \(I_0 = 0\), and \(I_1 = Y\).
3. OR Gate using 2:1 Mux
Connect \(X\) to select line \(S_0\), \(I_0 = Y\), and \(I_1 = 1\).
4. NAND Gate using 2:1 Mux (Requires 2 MUX)
MUX 1 acts as NOT gate (\(\overline{Y}\)). In MUX 2: \(S_0 = X, I_0 = 1, I_1 = \overline{Y}\).
5. NOR Gate using 2:1 Mux (Requires 2 MUX)
MUX 1 generates \(\overline{Y}\). In MUX 2: \(S_0 = X, I_0 = \overline{Y}, I_1 = 0\).
6. EX-OR Gate using 2:1 Mux (Requires 2 MUX)
MUX 1 generates \(\overline{Y}\). In MUX 2: \(S_0 = X, I_0 = Y, I_1 = \overline{Y}\).
7. EX-NOR Gate using 2:1 Mux (Requires 2 MUX)
MUX 1 generates \(\overline{Y}\). In MUX 2: \(S_0 = X, I_0 = \overline{Y}, I_1 = Y\).
5. Implementation of Higher Order MUX using Lower Order MUX
4:1 MUX using 2:1 MUX
A 4:1 MUX requires three (3) 2:1 multiplexers:
• Stage 1: Two 2:1 MUX driven by select line \(S_0\).
• Stage 2: One 2:1 MUX driven by select line \(S_1\).
General Formula for 2ⁿ:1 MUX using 2:1 MUX
When only 2:1 MUXes are available, constructing a \(2^n:1\) MUX requires \(2^n-1\) individual 2:1 units. The MUXes are arranged as a selection tree:
• 8:1 MUX: \(2^3 - 1 = \mathbf{7}\)
• 16:1 MUX: \(2^4 - 1 = \mathbf{15}\)
• 64:1 MUX: \(2^6 - 1 = \mathbf{63}\)
4:1 MUX Using 2:1 MUX
Tree Reduction Formula: B:1 MUX using A:1 MUX
To build a \(B:1\) MUX from smaller \(A:1\) MUXes, repeatedly divide the number of required inputs by \(A\) until the final stage contains one MUX. Adding the MUX counts at every stage gives the total: $$\frac{B}{A} = K_1, \quad \frac{K_1}{A} = K_2, \quad \frac{K_2}{A} = K_3 \quad \dots \quad K_N = 1$$ $$\text{Total MUXes Required} = K_1 + K_2 + K_3 + \dots + K_N$$
• Step 1: \(64 / 4 = 16\)
• Step 2: \(16 / 4 = 4\)
• Step 3: \(4 / 4 = 1\)
Total 4:1 MUX Required = \(16 + 4 + 1 = \mathbf{21}\).
6. Implementing Boolean Functions using 4:1 MUX
As an example, consider the following Boolean function and its specified don't-care condition: $$f(A, B, C) = \sum m(1, 2, 3, 5, 6) \quad \text{with Don't Care } d(7)$$
Option A: AB as Select Lines
| Minterms (\(C=0, C=1\)) | Select \(AB\) | Data Input |
|---|---|---|
| \(m_0(0), m_1(1)\) | 00 | \(I_0 = C\) |
| \(m_2(1), m_3(1)\) | 01 | \(I_1 = 1\) |
| \(m_4(0), m_5(1)\) | 10 | \(I_2 = C\) |
| \(m_6(1), m_7(X)\) | 11 | \(I_3 = 1\) |
Option B: AC as Select Lines
| Minterms (\(B=0, B=1\)) | Select \(AC\) | Data Input |
|---|---|---|
| \(m_0(0), m_2(1)\) | 00 | \(I_0 = B\) |
| \(m_1(1), m_3(1)\) | 01 | \(I_1 = 1\) |
| \(m_4(0), m_6(1)\) | 10 | \(I_2 = B\) |
| \(m_5(1), m_7(X)\) | 11 | \(I_3 = 1\) |
7. Applications of Multiplexers
- Data Routing: Selecting one signal path from several sources and connecting the chosen source to a common channel.
- Data Selection: Choosing among registers, processor signals, sensor buses, or other digital sources according to control signals.
- Analog-to-Digital Conversion (ADC): Sharing one ADC among multiple analog sources by selecting which sensor signal is sampled.
- Address Decoding & Memory Banking: Selecting memory blocks in RAM and ROM subsystems.
- Boolean Function Implementation: Realizing different combinational functions by programming the MUX data inputs and select lines appropriately.