Skip to content
GATEiit

GATE EC · Digital Circuits

Multiplexers

How a multiplexer selects one of many inputs, its Boolean expression, building large multiplexers from small ones, and using a multiplexer to implement any Boolean function, the way GATE asks it.

Before you start

  • Boolean algebra and minterms →

    A multiplexer output is a sum of minterms of the select lines, each ANDed with a data input.

  • Karnaugh maps →

    Reading the function a multiplexer implements usually ends with a K-map simplification.

  • Decoders →

    A multiplexer is a decoder on the select lines followed by AND-OR gating; a demultiplexer is a decoder with enable.

This topic comes before: ALU, data-path and control unit, Decoders, Shift-registers

Concept notes

1. What a multiplexer does

A multiplexer (MUX) is a combinational circuit that connects one of 2n data inputs to a single output, chosen by n select lines. It is a digitally controlled switch, also called a data selector.

For a 2:1 MUX with select S:

Y=Sˉ I0+S I1

For a 4:1 MUX with selects S1S0 (S1 is the MSB):

Y=S1ˉS0ˉ I0+S1ˉS0 I1+S1S0ˉ I2+S1S0 I3

In general Y=∑i=02n−1mi Ii, where mi is the i-th minterm of the select variables. So the MUX is a decoder on the select lines whose outputs gate the data inputs, followed by an OR.

MUX Select lines Data inputs
2:1 1 2
4:1 2 4
8:1 3 8
2n:1 n 2n

An enable (strobe) input, often active low, forces Y=0 when the chip is disabled; it is used to combine chips into bigger multiplexers.

The demultiplexer (DEMUX) does the opposite: one data input is routed to one of 2n outputs. A 1:4 DEMUX is the same circuit as a 2-to-4 decoder with enable, with the enable used as the data input.

When a question gives a MUX in a circuit, always check which select line is the MSB; swapping S1 and S0 swaps I1 and I2.

4:1 MUXI00I11I22I33YS1S0S1 S0 | Y0 0 | I00 1 | I11 0 | I21 1 | I3
A 4:1 multiplexer: the select code S1 S0 (S1 is the MSB) picks which data input reaches Y.

2. Implementing a Boolean function with a multiplexer

A MUX is a universal function generator. Two standard methods:

Method 1: 2n:1 MUX for an n-variable function. Put all n variables on the select lines. Tie Ii to 1 if minterm mi is in the function, else to 0. No extra gates are needed.

Method 2: 2n−1:1 MUX for an n-variable function. Put n−1 variables on the selects and use the remaining variable (say C) at the data inputs. For each select combination, look at the pair of minterms it covers (C=0 and C=1):

F for C=0 F for C=1 Data input
0 0 0
0 1 C
1 0 Cˉ
1 1 1

Method 2 is the usual GATE pattern: a 4:1 MUX implements any 3-variable function, and an 8:1 MUX implements any 4-variable function, given the last variable and its complement.

Reading a given MUX (analysis). Write Y=∑miIi with the select variables, substitute the data inputs, and simplify. For a quick answer, list the minterms: for each select code, the data input tells you which values of the remaining variable make F=1.

Use a truth table with the select variables as the leading columns, in the order the question gives them as MSB to LSB. Getting this order wrong is the most common error.

3. Building larger multiplexers from smaller ones

A large MUX is built as a tree of smaller ones. With k:1 MUXes for an N:1 MUX (N a power of k):

  • the first level has N/k MUXes, all driven by the low-order select bits;
  • each next level has 1/k as many, driven by the next select bits;
  • the count is Nk+Nk2+⋯+1=N−1k−1.
Build From Count
8:1 2:1 4+2+1=7
16:1 2:1 15
16:1 4:1 4+1=5
64:1 4:1 16+4+1=21

For 2:1 MUXes the count is simply N−1.

When N is not a power of k, the last level is partly used; count the MUXes level by level: ⌈N/k⌉ on the first level, then ⌈⋅/k⌉ again, until one remains.

An alternative uses the enable inputs: two 8:1 MUX chips with a 1-of-2 enable (driven by S3 and S3ˉ) and an OR gate make a 16:1 MUX.

Each MUX level adds its propagation delay, so a tree of depth d has delay about d times one MUX delay on the select-to-output path.

4. The 2:1 MUX as a universal gate

With constants 0 and 1 available, a single 2:1 MUX (Y=SˉI0+SI1) gives the basic gates:

Function S I0 I1
Aˉ (NOT) A 1 0
AB (AND) A 0 B
A+B (OR) A B 1
AˉB A B 0
A+Bˉ B 1 A

XOR needs the complement of a variable: S=A, I0=B, I1=Bˉ gives AˉB+ABˉ=A⊕B. Without a free Bˉ, a second MUX makes it (as NOT). Since NOT and AND (or OR) are possible, the 2:1 MUX is functionally complete: any Boolean function can be built only from 2:1 MUXes and constants.

Cascades show up often in GATE: a chain of 2:1 MUXes where the output of one feeds a data or select input of the next. Solve it stage by stage, writing each output as a Boolean expression before moving on.

Useful patterns:

  • S=A, I0=I1=X gives Y=X (select does not matter).
  • S=A, I0=A, I1=B gives AˉA+AB=AB.
  • S=A, I0=B, I1=A gives AˉB+A=A+B.

Formulas to remember

2:1 MUX
Y=Sˉ I0+S I1
4:1 MUX
Y=S1ˉS0ˉI0+S1ˉS0I1+S1S0ˉI2+S1S0I3
General MUXmi = minterm i of the n select variables
Y=∑i=02n−1mi Ii
Select lines neededFor an N:1 multiplexer
n=log⁡2N
Number of k:1 MUXes for an N:1 MUXN a power of k; for 2:1 MUXes this is N−1
Nk+Nk2+⋯+1=N−1k−1

Common mistakes

  • Swapping the MSB and LSB select lines, which interchanges I1 and I2 and gives the wrong function.
  • Counting MUXes in a tree as N/k only, forgetting the later levels.
  • Writing the data input as C when the pair of minterms needs C complement (F = 1 only when C = 0).
  • Assuming a 2:1 MUX can make XOR from A and B alone; it needs a complemented variable.
  • In cascaded MUXes, substituting the final output before simplifying each stage, which leads to algebra errors.

Worked examples

Try each step yourself, then reveal the working.

Example 1: A 3-variable function on a 4:1 MUX

numerical

Implement F(A,B,C)=∑m(1,3,5,6) with a 4:1 MUX, using A (MSB) and B as the select lines.

  1. Step 1: Group the minterms by the select code $AB$.

    Try it on paper first.

Example 2: Reading a 4:1 MUX circuit

numerical

A 4:1 MUX has S1=A, S0=B, and data inputs I0=0, I1=C, I2=C, I3=1. Find the function in simplest form.

  1. Step 1: Write the output with the select minterms.

    Try it on paper first.

Example 3: Counting MUXes in a tree

numerical

How many 2:1 MUXes are needed for a 32:1 MUX, and how many 4:1 MUXes for a 64:1 MUX?

  1. Step 1: Count 2:1 MUXes level by level.

    Try it on paper first.

Example 4: Cascaded 2:1 MUXes

conceptual

MUX 1 has S=A, I0=B, I1=Bˉ, output P. MUX 2 has S=C, I0=P, I1=Pˉ, output Y. Find Y.

  1. Step 1: Write MUX 1's output.

    Try it on paper first.

Previous year questions

3 official GATE EC questions on this topic, newest first.

Topic test

10 questions: up to 3 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-28. Spotted a mistake? Use Report an issue on any question, or contact us.