GEEKSFORGEEKS REFERENCE COMPREHENSIVE STUDY GUIDE

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.

Quick idea: Think of a multiplexer as a digital selector: the select lines decide which one of the available inputs is connected to the output.
Diagrams: Directly embedded from GeeksforGeeks' MUX article. The diagrams are retained as published and attributed to GeeksforGeeks. View source article ↗

1. Types of Multiplexers

Multiplexers are classified based on the number of data input channels:

2 : 1 Mux (1 select line) 4 : 1 Mux (2 select lines) 8 : 1 Mux (3 select lines) 16 : 1 Mux (4 select lines)

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:

$$Y = \overline{S_0} \cdot I_0 + S_0 \cdot I_1$$

Circuit Diagram of 2x1 Multiplexer

GeeksforGeeks circuit diagram of a 2 to 1 multiplexer
GeeksforGeeks diagram — source

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\))
00\(I_0\)
01\(I_1\)
10\(I_2\)
11\(I_3\)

Logical Expression of 4x1 MUX

$$Y = \overline{S_1}\,\overline{S_0}\,I_0 + \overline{S_1}\,S_0\,I_1 + S_1\,\overline{S_0}\,I_2 + S_1\,S_0\,I_3$$

The circuit uses 4 three-input AND gates, 2 NOT gates, and 1 four-input OR gate.

Visual: 4:1 MUX selection map
4 : 1 MUX 2 select lines I₀I₁ I₂I₃ Y S₁ S₀
S₁S₀00 → I₀
S₁S₀01 → I₁
S₁S₀10 → I₂
S₁S₀11 → I₃

4:1 MUX — Block Diagram

GeeksforGeeks 4 to 1 multiplexer block diagram
GeeksforGeeks diagram — source

4:1 MUX — Logic Circuit

GeeksforGeeks 4 to 1 multiplexer logic circuit
GeeksforGeeks diagram — source

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:

2:1 MUX I₀=0, I₁=Y X = S₀ X·Y
Example: AND realization with I₀=0 and I₁=Y.
2:1 MUX I₀=Y, I₁=Ȳ X = S₀ X ⊕ Y
Example: XOR realization by selecting Y or Ȳ.

1. NOT Gate using 2:1 Mux

Connect input \(A\) to select line \(S_0\). Connect \(I_0 = 1\) and \(I_1 = 0\).

$$Y = \overline{A}\cdot 1 + A\cdot 0 = \mathbf{\overline{A}}$$

2. AND Gate using 2:1 Mux

Connect \(X\) to select line \(S_0\), \(I_0 = 0\), and \(I_1 = Y\).

$$Y = \overline{X}\cdot 0 + X\cdot Y = \mathbf{X \cdot Y}$$

3. OR Gate using 2:1 Mux

Connect \(X\) to select line \(S_0\), \(I_0 = Y\), and \(I_1 = 1\).

$$Y = \overline{X}\cdot Y + X\cdot 1 = \mathbf{X + Y}$$

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}\).

$$Y = \overline{X}\cdot 1 + X\cdot \overline{Y} = \mathbf{\overline{X \cdot 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\).

$$Y = \overline{X}\cdot \overline{Y} + X\cdot 0 = \mathbf{\overline{X + Y}}$$

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}\).

$$Y = \overline{X}\cdot Y + X\cdot \overline{Y} = \mathbf{X \oplus 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\).

$$Y = \overline{X}\cdot \overline{Y} + X\cdot Y = \mathbf{X \odot 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

GeeksforGeeks 4 to 1 multiplexer implemented using 2 to 1 multiplexers
GeeksforGeeks diagram — source

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$$

Example: Implement 64:1 MUX using 4:1 MUX
• 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\)

Don't-Care Implementation — AB as Select

GeeksforGeeks Boolean function implementation using AB as select lines
GeeksforGeeks diagram — source

Don't-Care Implementation — AC as Select

GeeksforGeeks Boolean function implementation using AC as select lines
GeeksforGeeks diagram — source

7. Applications of Multiplexers

Visual/source note: Theory, equations, tables and page structure are based on the supplied project HTML. The MUX diagrams shown on this page are embedded directly from GeeksforGeeks and are attributed to GeeksforGeeks. GeeksforGeeks — Multiplexers in Digital Logic ↗