Skip to main content

5.3 Multiplexers (MUX) & Function Implementation

πŸ“šModule 05: Combinational Logic CircuitsTopic 5.3⏱️20 min read
🎯High-Yield For:University Semester Exams β€’ Hardware Engineering Rounds β€’ Foundational Computing

πŸ’‘ Core Intuition: The Rotary Train Track Switch​

Imagine a busy train terminal where four separate incoming freight lines (I0,I1,I2,I3I_0, I_1, I_2, I_3) merge into a single outbound mainline track (YY). A switch operator sits in a control tower with a two-lever selector console (S1,S0S_1, S_0). By flipping the levers into one of four possible binary combinations (00,01,10,1100, 01, 10, 11), the operator physically steers exactly one train onto the main track while holding all others back.

🍳 The Everyday Analogy: The Multi-Source TV Remote​

  • The Input Channels: Your television has multiple ports: HDMI 1 (I0I_0), HDMI 2 (I1I_1), DisplayPort (I2I_2), and Cable TV (I3I_3).
  • The Single Display Output: Your TV screen (YY) can only display one video feed at any given moment.
  • The Selector Buttons: When you push button "2" on your remote control (S1S0=01S_1 S_0 = 01), an internal routing switch disconnects all other inputs and routes HDMI 2 directly to the screen pixels.
  • This is a Multiplexer (MUX): a digitally controlled data selector that funnels 2n2^n data input channels into a single output line under the direction of nn control select lines.

πŸ’» Bridging to Computer Science​

In computer architecture, data routing is ubiquitous:

  1. CPU Register Files: When an instruction executes ADD R1, R2, R3, a multiplexer decodes the register ID R2 to select which physical register lines are wired to the ALU's operand port.
  2. Bus Arbitration: Multiple memory controllers and DMA engines contend for a single memory bus. A multiplexer network grants channel access to one master at a time.
  3. FPGA Architecture: Field Programmable Gate Arrays do not physically re-wire AND/OR gates at runtime. Instead, an FPGA consists of millions of Look-Up Tables (LUTs), which are essentially SRAM memory cells feeding wide multiplexer trees!


πŸ”€ MUX Fundamentals & Gate Architecture​

A Multiplexer (often abbreviated as MUX or Data Selector) possesses:

  • 2n2^n Data Inputs: I0,I1,…,I2nβˆ’1I_0, I_1, \dots, I_{2^n-1}
  • nn Select Inputs: Snβˆ’1,Snβˆ’2,…,S0S_{n-1}, S_{n-2}, \dots, S_0
  • 11 Enable Input (Strobe): EΛ‰\bar{E} or EE (optional chip-select line)
  • 11 Single Output: YY
πŸ”€

Data Inputs (2ⁿ)

Source Streams
  • Carries digital information from multiple independent sources.
  • Can carry constant logic levels (0, 1) or time-varying data signals.
πŸŽ›οΈ

Select Lines (n)

Address Control
  • An n-bit binary control word selects exactly one active input channel.
  • Number of select lines is logarithmic: n = logβ‚‚(Data Inputs).
πŸšͺ

Enable / Strobe

Chip Control
  • Typically active-low (E_bar).
  • When asserted (0), normal MUX routing occurs; when de-asserted (1), output is forced to 0 (or High-Z).

The 2:1 Multiplexer​

  • Inputs: 22 data lines (I0,I1I_0, I_1), 11 select line (SS), 11 output (YY).
Select (SS)Active Input SelectedOutput (YY)
00I0I_0Y=I0Y = I_0
11I1I_1Y=I1Y = I_1
πŸ“2:1 MUX Governing Equationformula
Y=SˉI0+SI1Y = \bar{S}I_0 + S I_1

With active-low enable input Eˉ\bar{E}:

Y=E‾⋅(SˉI0+SI1)Y = \overline{E} \cdot (\bar{S}I_0 + S I_1)
  • Channel 0 AND Gate: Evaluates SΛ‰β‹…I0\bar{S} \cdot I_0.
  • Channel 1 AND Gate: Evaluates Sβ‹…I1S \cdot I_1.
  • Output OR Gate: Combines both paths: Y=SΛ‰I0+SI1Y = \bar{S}I_0 + SI_1.

The 4:1 Multiplexer​

  • Inputs: 44 data lines (I0,I1,I2,I3I_0, I_1, I_2, I_3), 22 select lines (S1,S0S_1, S_0), 11 output (YY).
Enable (Eˉ\bar{E})S1S_1 (MSB)S0S_0 (LSB)Selected InputOutput (YY)
11Γ—\timesΓ—\timesNone (Disabled)00
000000I0I_0Y=I0Y = I_0
000011I1I_1Y=I1Y = I_1
001100I2I_2Y=I2Y = I_2
001111I3I_3Y=I3Y = I_3
πŸ“4:1 MUX Governing Equationformula
Y=Sˉ1Sˉ0I0+Sˉ1S0I1+S1Sˉ0I2+S1S0I3Y = \bar{S}_1\bar{S}_0 I_0 + \bar{S}_1 S_0 I_1 + S_1\bar{S}_0 I_2 + S_1 S_0 I_3
Interactive 4:1 MUX Routing
4:1 MUXI0=0I1=1I2=0I3=1S₁=0Sβ‚€=1Y=1
Enable (E_bar)
Select S₁ (MSB)
Select Sβ‚€ (LSB)
Data Channels (Toggle Values)
I_0Code 00
I_1Code 01
βž” ROUTED
I_2Code 10
I_3Code 11

🌳 Hierarchical MUX Tree Expansion​

When a system requires a wider multiplexer than what is available in standard catalog ICs (e.g., building a 16:1 MUX from 4:1 MUXes), we construct a Hierarchical MUX Tree.

Synthesizing a 4:1 MUX Using Three 2:1 MUXes​

We can build a 4:1 MUX using two levels of 2:1 MUXes:

  • Level 1: Two 2:1 MUXes select between pairs of inputs controlled by S0S_0:
    • MUXAMUX_A: Inputs (I0,I1)(I_0, I_1) controlled by S0β€…β€ŠβŸΉβ€…β€ŠYA=SΛ‰0I0+S0I1S_0 \implies Y_A = \bar{S}_0 I_0 + S_0 I_1
    • MUXBMUX_B: Inputs (I2,I3)(I_2, I_3) controlled by S0β€…β€ŠβŸΉβ€…β€ŠYB=SΛ‰0I2+S0I3S_0 \implies Y_B = \bar{S}_0 I_2 + S_0 I_3
  • Level 2: One 2:1 MUX selects between YAY_A and YBY_B controlled by S1S_1:
    • MUXfinalMUX_{final}: Inputs (YA,YB)(Y_A, Y_B) controlled by S1β€…β€ŠβŸΉβ€…β€ŠY=SΛ‰1YA+S1YBS_1 \implies Y = \bar{S}_1 Y_A + S_1 Y_B
Architecture Flow

Two-Level 4:1 MUX Tree Hierarchy Using 2:1 MUXes

Hierarchical steering: Level 1 decodes LSB select Sβ‚€, Level 2 decodes MSB select S₁

πŸ’‘ Hover or click any card for deep-dive operational details
Stage 1 (2 MUXes)

Level 1: Sβ‚€ Selection

MUX A routes (Iβ‚€, I₁) to Y_A; MUX B routes (Iβ‚‚, I₃) to Y_B.

β†’
Routes to Level 2
Stage 2 (1 MUX)

Level 2: S₁ Selection

Final MUX selects between intermediate outputs (Y_A, Y_B).

πŸ”Algebraic Proof of 2:1 MUX Tree Expansionproof

Substitute YAY_A and YBY_B into the Level 2 equation:

Y=Sˉ1YA+S1YB=Sˉ1(Sˉ0I0+S0I1)+S1(Sˉ0I2+S0I3)=Sˉ1Sˉ0I0+Sˉ1S0I1+S1Sˉ0I2+S1S0I3\begin{aligned} Y &= \bar{S}_1 Y_A + S_1 Y_B \\ &= \bar{S}_1(\bar{S}_0 I_0 + S_0 I_1) + S_1(\bar{S}_0 I_2 + S_0 I_3) \\ &= \bar{S}_1\bar{S}_0 I_0 + \bar{S}_1 S_0 I_1 + S_1\bar{S}_0 I_2 + S_1 S_0 I_3 \end{aligned}

The result matches the exact equation of a 4:1 Multiplexer.

General MUX Sizing Rule​

To synthesize an MM-to-1 MUX using NN-to-1 MUX modules:

  • Number of modules in First Stage =⌈M/NβŒ‰= \lceil M / N \rceil
  • Continue cascading until a single output remains.
  • Total number of N:1N:1 MUXes =Mβˆ’1Nβˆ’1= \frac{M - 1}{N - 1} (when MM and NN are powers of 2).

For example:

  • Building an 8:1 MUX using 2:1 MUXes: 8βˆ’12βˆ’1=7Β MUXes\frac{8 - 1}{2 - 1} = \mathbf{7\text{ MUXes}} (44 in stage 1, 22 in stage 2, 11 in stage 3).
  • Building a 16:1 MUX using 4:1 MUXes: 16βˆ’14βˆ’1=5Β MUXes\frac{16 - 1}{4 - 1} = \mathbf{5\text{ MUXes}} (44 in stage 1, 11 in stage 2).

⚑ Boolean Logic Implementation via MUX​

A multiplexer is essentially a programmable truth table lookup engine.

Method 1: Trivial Implementation Using a 2n2^n-to-1 MUX​

To implement an arbitrary nn-variable Boolean function F(X1,X2,…,Xn)F(X_1, X_2, \dots, X_n) using a 2n2^n-to-1 MUX:

  1. Connect all nn function variables directly to the nn select lines: Snβˆ’1=X1,…,S0=XnS_{n-1} = X_1, \dots, S_0 = X_n.
  2. For every minterm mkm_k where F=1F = 1, tie the corresponding data input IkI_k to Logic 1 (VDDV_{DD}).
  3. For every minterm mkm_k where F=0F = 0, tie the corresponding data input IkI_k to Logic 0 (GNDGND).

While simple, this method is hardware-inefficient because it requires a large MUX. In engineering interviews and real chip design, we use Method 2.


πŸ“ The Residue Table Method (2nβˆ’1:12^{n-1}:1 MUX)​

Any nn-variable Boolean function can be implemented using a multiplexer with only nβˆ’1n-1 select lines (a 2nβˆ’12^{n-1}-to-1 MUX) without needing any additional external logic gates!

The Step-by-Step Algorithm​

  1. Select Control Variables: Assign (nβˆ’1)(n-1) variables to the MUX select lines. By convention, assign the most significant variables to select lines (Snβˆ’2,…,S0)(S_{n-2}, \dots, S_0).
  2. Identify the Residue Variable: Let the single remaining unassigned variable be ZZ (typically the LSB).
  3. Construct the Implementation Table:
    • Create 2nβˆ’12^{n-1} columns corresponding to the MUX inputs I0,I1,…,I2nβˆ’1βˆ’1I_0, I_1, \dots, I_{2^{n-1}-1}.
    • Under each input IkI_k, list the two minterms it addresses:
      • Top row: minterm when Z=0Z = 0 (ZΛ‰\bar{Z})
      • Bottom row: minterm when Z=1Z = 1 (ZZ)
    • Circle the minterms that are present in the function's ON-set (βˆ‘m\sum m).
  4. Determine Each Data Input Value:
    • If neither minterm in the column is circled β€…β€ŠβŸΉβ€…β€ŠIk=0\implies I_k = \mathbf{0}.
    • If both minterms in the column are circled β€…β€ŠβŸΉβ€…β€ŠIk=1\implies I_k = \mathbf{1}.
    • If only the top minterm (ZΛ‰\bar{Z}) is circled β€…β€ŠβŸΉβ€…β€ŠIk=ZΛ‰\implies I_k = \mathbf{\bar{Z}}.
    • If only the bottom minterm (ZZ) is circled β€…β€ŠβŸΉβ€…β€ŠIk=Z\implies I_k = \mathbf{Z}.
Architecture Flow

The 4-Way Residue Table Decision Rules

Mapping circled minterms in column k directly to MUX data input pin I_k

πŸ’‘ Hover or click any card for deep-dive operational details
Logic 0 (GND)

Neither Circled

Both minterms absent from function ON-set.

β†’
Tie to GND
Logic 1 (V_DD)

Both Circled

Both minterms present in function ON-set.

β†’
Tie to V_DD
Complement (ZΜ„)

Top Only Circled

Asserted only when residue variable Z = 0.

β†’
Wire ZΜ„
Direct (Z)

Bottom Only Circled

Asserted only when residue variable Z = 1.


🧩 The Universal Logic Module Property​

A multiplexer is a universal logic module: any fundamental logic gate can be implemented using a single 2:1 Multiplexer.

πŸ“Synthesizing Basic Gates Using a 2:1 MUX (Y = S'Iβ‚€ + SI₁)formula

Let select line S=AS = A:

  1. NOT Gate (Aˉ\bar{A}):
    Set I0=1,I1=0β€…β€ŠβŸΉβ€…β€ŠY=AΛ‰(1)+A(0)=AΛ‰I_0 = 1, I_1 = 0 \implies Y = \bar{A}(1) + A(0) = \mathbf{\bar{A}}
  2. AND Gate (ABAB):
    Set I0=0,I1=Bβ€…β€ŠβŸΉβ€…β€ŠY=AΛ‰(0)+A(B)=ABI_0 = 0, I_1 = B \implies Y = \bar{A}(0) + A(B) = \mathbf{AB}
  3. OR Gate (A+BA + B):
    Set I0=B,I1=1β€…β€ŠβŸΉβ€…β€ŠY=AΛ‰B+A(1)=A+AΛ‰B=A+BI_0 = B, I_1 = 1 \implies Y = \bar{A}B + A(1) = A + \bar{A}B = \mathbf{A + B}
  4. NAND Gate (ABβ€Ύ\overline{AB}):
    Set I0=1,I1=BΛ‰β€…β€ŠβŸΉβ€…β€ŠY=AΛ‰(1)+ABΛ‰=AΛ‰+BΛ‰=ABβ€ΎI_0 = 1, I_1 = \bar{B} \implies Y = \bar{A}(1) + A\bar{B} = \bar{A} + \bar{B} = \mathbf{\overline{AB}}
  5. NOR Gate (A+Bβ€Ύ\overline{A + B}):
    Set I0=BΛ‰,I1=0β€…β€ŠβŸΉβ€…β€ŠY=AΛ‰BΛ‰+A(0)=AΛ‰BΛ‰=A+Bβ€ΎI_0 = \bar{B}, I_1 = 0 \implies Y = \bar{A}\bar{B} + A(0) = \mathbf{\bar{A}\bar{B} = \overline{A + B}}
  6. XOR Gate (AβŠ•BA \oplus B):
    Set I0=B,I1=BΛ‰β€…β€ŠβŸΉβ€…β€ŠY=AΛ‰B+ABΛ‰=AβŠ•BI_0 = B, I_1 = \bar{B} \implies Y = \bar{A}B + A\bar{B} = \mathbf{A \oplus B}
  7. XNOR Gate (AβŠ™BA \odot B):
    Set I0=BΛ‰,I1=Bβ€…β€ŠβŸΉβ€…β€ŠY=AΛ‰BΛ‰+AB=AβŠ™BI_0 = \bar{B}, I_1 = B \implies Y = \bar{A}\bar{B} + AB = \mathbf{A \odot B}

🏭 Real-World Production Context: Data Steering, Processor Interconnects & FPGA LUTs​

Why does modern compute and reconfigurable hardware care so deeply about multiplexers?

  • CPU Register Files: When executing ADD R1, R2, R3, a multiplexer decodes register address R2 to steer the physical register lines onto the ALU operand bus.
  • Shared Memory Interconnects: Crossbar switches and AXI bus interconnects route multi-core memory traffic using cascaded MUX arrays.
  • FPGA Look-Up Tables (LUTs): Configurable logic blocks in modern FPGAs (AMD Xilinx, Intel Altera) rely on SRAM cells driving wide multiplexer trees to emulate arbitrary combinational functions in single-cycle deterministic latency:

Inside a 6-Input FPGA Look-Up Table (LUT6)

How configuration SRAM cells and high-speed multiplexer trees evaluate arbitrary Boolean logic

Storage Layer

Configuration SRAM Cells (64 Bits)

πŸ’Ύ

Holds the truth table output bits (0 or 1) programmed during bitstream upload.

64x1 SRAM ArrayStatic RetentionBitstream Configured
↓SRAM Bitlines to MUX Inputs
Steering Core

6-Level Multiplexer Tree (64:1 MUX)

πŸ”€

Constructed from cascading 2:1 MUXes controlled by primary inputs A, B, C, D, E, F.

6 Cascaded LevelsFast NMOS Pass GatesTree Decoder
↓Selected Bit to Output
Output Stage

LUT Output Pin (Y)

⚑

Delivers the evaluated Boolean function in a deterministic 150-picosecond latency.

Deterministic t_pdFlip-Flop BypassCarry Chain Tap
  • When a software developer writes Verilog/VHDL code for an arbitrary equation F(A,B,C,D,E,F)F(A, B, C, D, E, F), the synthesis tool evaluates the truth table and stores all 64 output bits into 64 SRAM cells.
  • The 6 input signals act as select lines driving a 64:1 MUX tree.
  • In silicon, any arbitrary 6-variable Boolean function executes in the exact same deterministic propagation delay, regardless of whether the function is a simple AND gate or a complex cryptographic hash round!

πŸ“ Numerical Applications & Worked Examples​

Example 1: Full Adder Implementation Using Two 4:1 Multiplexers​

Problem Statement:
Design a 1-bit Full Adder (A,B,Cin→S,CoutA, B, C_{in} \to S, C_{out}) using two 4:1 Multiplexers. Connect variables AA and BB to select lines (S1=A,S0=BS_1 = A, S_0 = B) and derive the exact data input connections for both MUXes using the residue table method.

Step 1: Write Truth Table for Full Adder​

Inputs: A,B,CinA, B, C_{in}. Output: S=βˆ‘m(1,2,4,7)S = \sum m(1, 2, 4, 7), Cout=βˆ‘m(3,5,6,7)C_{out} = \sum m(3, 5, 6, 7).

MintermAA (S1S_1)BB (S0S_0)CinC_{in} (Residue)Sum (SS)Carry (CoutC_{out})
m0m_00000000000
m1m_10000111100
m2m_20011001100
m3m_30011110011
m4m_41100001100
m5m_51100110011
m6m_61111000011
m7m_71111111111

Step 2: Implementation Table for Sum (S=βˆ‘m(1,2,4,7)S = \sum m(1, 2, 4, 7))​

Select lines: S1=A,S0=BS_1 = A, S_0 = B. Residue variable: CinC_{in}.

Row ConditionI0I_0 (AB=00AB=00)I1I_1 (AB=01AB=01)I2I_2 (AB=10AB=10)I3I_3 (AB=11AB=11)
Cin=0C_{in} = 0 (Cˉin\bar{C}_{in})m0m_0m2m_2 (circled)m4m_4 (circled)m6m_6
Cin=1C_{in} = 1 (CinC_{in})m1m_1 (circled)m3m_3m5m_5m7m_7 (circled)
Data Input ValueCinC_{in}Cˉin\bar{C}_{in}Cˉin\bar{C}_{in}CinC_{in}
  • Column I0I_0: m1m_1 circled β€…β€ŠβŸΉβ€…β€ŠI0=Cin\implies I_0 = C_{in}
  • Column I1I_1: m2m_2 circled β€…β€ŠβŸΉβ€…β€ŠI1=CΛ‰in\implies I_1 = \bar{C}_{in}
  • Column I2I_2: m4m_4 circled β€…β€ŠβŸΉβ€…β€ŠI2=CΛ‰in\implies I_2 = \bar{C}_{in}
  • Column I3I_3: m7m_7 circled β€…β€ŠβŸΉβ€…β€ŠI3=Cin\implies I_3 = C_{in}

Step 3: Implementation Table for Carry (Cout=βˆ‘m(3,5,6,7)C_{out} = \sum m(3, 5, 6, 7))​

Row ConditionI0I_0 (AB=00AB=00)I1I_1 (AB=01AB=01)I2I_2 (AB=10AB=10)I3I_3 (AB=11AB=11)
Cin=0C_{in} = 0 (Cˉin\bar{C}_{in})m0m_0m2m_2m4m_4m6m_6 (circled)
Cin=1C_{in} = 1 (CinC_{in})m1m_1m3m_3 (circled)m5m_5 (circled)m7m_7 (circled)
Data Input Value00CinC_{in}CinC_{in}11
  • Column I0I_0: Neither circled β€…β€ŠβŸΉβ€…β€ŠI0=0\implies I_0 = 0 (GND)
  • Column I1I_1: m3m_3 circled β€…β€ŠβŸΉβ€…β€ŠI1=Cin\implies I_1 = C_{in}
  • Column I2I_2: m5m_5 circled β€…β€ŠβŸΉβ€…β€ŠI2=Cin\implies I_2 = C_{in}
  • Column I3I_3: Both circled (m6,m7m_6, m_7) β€…β€ŠβŸΉβ€…β€ŠI3=1\implies I_3 = 1 (VDDV_{DD})

Final Circuit Summary​

  • MUX 1 (Sum): Inputs [I0,I1,I2,I3]=[Cin,CΛ‰in,CΛ‰in,Cin][I_0, I_1, I_2, I_3] = [C_{in}, \bar{C}_{in}, \bar{C}_{in}, C_{in}], Selects S1=A,S0=BS_1 = A, S_0 = B.
  • MUX 2 (Carry): Inputs [I0,I1,I2,I3]=[0,Cin,Cin,1][I_0, I_1, I_2, I_3] = [0, C_{in}, C_{in}, 1], Selects S1=A,S0=BS_1 = A, S_0 = B.

Example 2: Implementing a 4-Variable Function Using an 8:1 Multiplexer​

Problem Statement:
Implement the 4-variable Boolean function: F(A,B,C,D)=βˆ‘m(0,1,3,4,8,9,11,14,15)F(A, B, C, D) = \sum m(0, 1, 3, 4, 8, 9, 11, 14, 15) Using an 8:1 Multiplexer with A,B,CA, B, C connected to select lines S2,S1,S0S_2, S_1, S_0 respectively.

Step 1: Map Variables to Select and Residue Lines​

  • n=4n = 4 variables (A,B,C,DA, B, C, D).
  • Select inputs of 8:1 MUX: S2=AS_2 = A, S1=BS_1 = B, S0=CS_0 = C.
  • Residue variable: DD.

Step 2: Construct the Residue Table​

Inputs: I0I_0 to I7I_7 corresponding to ABC∈{000,001,010,011,100,101,110,111}ABC \in \{000, 001, 010, 011, 100, 101, 110, 111\}.

RowI0I_0 (000000)I1I_1 (001001)I2I_2 (010010)I3I_3 (011011)I4I_4 (100100)I5I_5 (101101)I6I_6 (110110)I7I_7 (111111)
D=0D = 0 (Dˉ\bar{D})m0m_0m2m_2m4m_4m6m_6m8m_8m10m_{10}m12m_{12}m14m_{14}
D=1D = 1 (DD)m1m_1m3m_3m5m_5m7m_7m9m_9m11m_{11}m13m_{13}m15m_{15}
Input11DDDˉ\bar{D}0011DD0011

Step 3: Determine Values for Each Input​

  • Column I0I_0: Both m0,m1m_0, m_1 are in Fβ€…β€ŠβŸΉβ€…β€ŠI0=1F \implies I_0 = \mathbf{1}
  • Column I1I_1: Only m3m_3 is in Fβ€…β€ŠβŸΉβ€…β€ŠI1=DF \implies I_1 = \mathbf{D}
  • Column I2I_2: Only m4m_4 is in Fβ€…β€ŠβŸΉβ€…β€ŠI2=DΛ‰F \implies I_2 = \mathbf{\bar{D}}
  • Column I3I_3: Neither m6m_6 nor m7m_7 is in Fβ€…β€ŠβŸΉβ€…β€ŠI3=0F \implies I_3 = \mathbf{0}
  • Column I4I_4: Both m8,m9m_8, m_9 are in Fβ€…β€ŠβŸΉβ€…β€ŠI4=1F \implies I_4 = \mathbf{1}
  • Column I5I_5: Only m11m_{11} is in Fβ€…β€ŠβŸΉβ€…β€ŠI5=DF \implies I_5 = \mathbf{D}
  • Column I6I_6: Neither m12m_{12} nor m13m_{13} is in Fβ€…β€ŠβŸΉβ€…β€ŠI6=0F \implies I_6 = \mathbf{0}
  • Column I7I_7: Both m14,m15m_{14}, m_{15} are in Fβ€…β€ŠβŸΉβ€…β€ŠI7=1F \implies I_7 = \mathbf{1}

Final Connections:

  • Select lines: S2=A,S1=B,S0=CS_2 = A, S_1 = B, S_0 = C.
  • Data inputs: I=[1,D,DΛ‰,0,1,D,0,1]I = [1, D, \bar{D}, 0, 1, D, 0, 1].

Example 3: Synthesizing an 8:1 MUX Using Only 2:1 MUXes​

Problem Statement:

  1. Determine the exact number of 2:1 Multiplexers required to construct an 8:1 Multiplexer.
  2. Draw the tree hierarchy showing how select lines S2,S1,S0S_2, S_1, S_0 are mapped across each level.
  3. If each 2:1 MUX has a propagation delay of 1.5Β ns1.5\text{ ns}, calculate the total propagation delay of the 8:1 MUX tree.

Step 1: Calculate Module Count​

Using the formula Mβˆ’1Nβˆ’1\frac{M - 1}{N - 1}: NumberΒ ofΒ 2:1Β MUXes=8βˆ’12βˆ’1=7Β MUXes\text{Number of 2:1 MUXes} = \frac{8 - 1}{2 - 1} = \mathbf{7\text{ MUXes}}

Step 2: Architecture & Select Line Allocation​

The 7 multiplexers are arranged in a 3-level binary tree:

  • Stage 1 (4 MUXes):
    • Inputs: (I0,I1)(I_0, I_1), (I2,I3)(I_2, I_3), (I4,I5)(I_4, I_5), (I6,I7)(I_6, I_7)
    • Select input for all 4 MUXes: S0S_0 (LSB)
    • Produces 4 intermediate outputs: Y1A,Y1B,Y1C,Y1DY_{1A}, Y_{1B}, Y_{1C}, Y_{1D}.
  • Stage 2 (2 MUXes):
    • Inputs: (Y1A,Y1B)(Y_{1A}, Y_{1B}) and (Y1C,Y1D)(Y_{1C}, Y_{1D})
    • Select input for both MUXes: S1S_1
    • Produces 2 intermediate outputs: Y2A,Y2BY_{2A}, Y_{2B}.
  • Stage 3 (1 MUX):
    • Inputs: (Y2A,Y2B)(Y_{2A}, Y_{2B})
    • Select input: S2S_2 (MSB)
    • Delivers the final output YY.

Step 3: Propagation Delay Analysis​

  • Signal propagation passes sequentially through one MUX in Stage 1, one MUX in Stage 2, and one MUX in Stage 3.
  • Total logic depth =log⁑2(8)=3Β levels= \log_2(8) = 3\text{ levels}.
  • Total propagation delay: Tpd=3Γ—t2:1_MUX=3Γ—1.5Β ns=4.5Β nsT_{pd} = 3 \times t_{2:1\_MUX} = 3 \times 1.5\text{ ns} = \mathbf{4.5\text{ ns}}

🎯 Exam & Interview Pitfall Check​

Core Conceptual Questions
  • Why can any nn-variable Boolean function be implemented with a 2nβˆ’1:12^{n-1}:1 MUX, but requires a 2n:12^n:1 MUX if no inverted input (ZΛ‰\bar{Z}) is available?
    The residue method depends on feeding four possible values to each MUX input: {0,1,Z,Zˉ}\{0, 1, Z, \bar{Z}\}. If you only have ZZ available without an inverter (NOT gate), you cannot generate Zˉ\bar{Z} for columns that only circle the top minterm. In that case, you must either add an external NOT gate or upgrade to a 2n:12^n:1 MUX where inputs are strictly constants (00 or 11).

  • Can you implement an nn-variable function using a 2nβˆ’2:12^{n-2}:1 MUX?
    Yes, but it requires external logic gates. With a 2nβˆ’2:12^{n-2}:1 MUX, two variables remain as residue variables. Each MUX input must then be driven by an arbitrary function of those two residue variables (e.g., Z1Z2Z_1 Z_2, Z1+Z2Z_1 + Z_2, Z1βŠ•Z2Z_1 \oplus Z_2), which requires external AND/OR/XOR gates.

Common Interview Traps
  • Trap: Inverting the Select Line Significance.
    When mapping variables to select lines, always verify MSB vs LSB alignment. If you assign S1=CS_1 = C and S0=AS_0 = A, your binary row selection will scramble the minterm addressing! Always maintain: SMSB=VariableMSBS_{MSB} = \text{Variable}_{MSB}.
  • Trap: Forgetting that MUX inputs must be tied off.
    In CMOS hardware, leaving an unused MUX input "floating" causes high-impedance oscillation and excessive static power consumption. In synthesis and schematic diagrams, every unused input MUST be explicitly tied to VDDV_{DD} or GNDGND.

πŸ’¬

Discussion & Doubts