CS Atlas GATE 2027
Digital Logic course
0 / 57 complete

Digital Logic/Phase 5 · Combinational Circuits

Lesson 5.2.1 · Item 36 of 57

Multiplexers, and implementing functions with them

Read at your own pace. Try the questions before opening the answers.

On this page

0 · Recall Warm-up

Answer from memory first. Answers are in the Answer Vault at the bottom.

1 · The Hook

🎣

A railway junction has several incoming tracks and one outgoing track; a switch lever decides which incoming train goes through. A multiplexer (MUX) is that junction for bits: select lines choose which data input reaches the output. Surprisingly, a MUX can implement any Boolean function, and GATE regularly asks you to read off the function a MUX circuit computes.

2 · Predict First

🤔

A 2-to-1 MUX outputs I₀ when S = 0 and I₁ when S = 1. Write its output Y as a Boolean expression.

Make a guess in your head. The answer opens Section 3.

3 · Core Concept

💡

Predict First — the answer

Y = S'I₀ + SI₁.

🗣️

In plain words

A 2ⁿ-to-1 multiplexer has 2ⁿ data inputs, n select inputs and one output. The select bits, read as a binary number k, connect input Iₖ to the output. If you wire the data inputs to the values of a truth table, the MUX becomes a lookup table, so it can produce any function.

1. MUX equations

  • 2:1: Y = S'I₀ + SI₁.
  • 4:1 (selects S₁ S₀): Y = S₁'S₀'I₀ + S₁'S₀I₁ + S₁S₀'I₂ + S₁S₀I₃.
  • In general Y = Σ mₖ(S)·Iₖ: each select minterm enables one input.

2. Any n-variable function with a 2ⁿ:1 MUX

Connect the n variables to the selects and put the truth-table column (0s and 1s) on the data inputs.

3. Any n-variable function with a 2ⁿ⁻¹:1 MUX (the GATE favourite)

Use n − 1 variables as selects. For each select combination, the remaining variable (say C) decides the output, which is always one of 0, 1, C or C'. F(A, B, C) = Σm(1, 2, 6, 7) with a 4:1 MUX, selects A B:

A BrowsFdata input
0 0m₀ = 0, m₁ = 1follows CI₀ = C
0 1m₂ = 1, m₃ = 0opposite of CI₁ = C'
1 0m₄ = 0, m₅ = 0always 0I₂ = 0
1 1m₆ = 1, m₇ = 1always 1I₃ = 1

4. Reading a MUX circuit

Write Y = Σ (select minterm) × (what is on that input) and simplify. Example: 2:1 MUX with S = A, I₀ = B, I₁ = B' gives A'B + AB' = A ⊕ B.

5. Bigger MUXes from smaller

An 8:1 MUX = two 4:1 MUXes + one 2:1 MUX. In general a 2ⁿ:1 MUX needs 2ⁿ − 1 two-to-one MUXes in a tree.

4 · Visual

Diagram: 4:1 MUX · I0 · I1 · I2 · I3 · Y · S1 · S0 · C · C' · 0 · 1 · A · B · F

F(A, B, C) = Σm(1, 2, 6, 7) on a 4:1 MUX: A, B select; the data inputs are C, C', 0 and 1.

5 · Worked Examples

Example 1 Easy

A 2:1 MUX has S = A, I₀ = 0, I₁ = B. What function is Y?

Solution

A'·0 + A·B = AB.

Example 2 Medium

How many 2:1 MUXes make a 16:1 MUX?

Solution

2⁴ − 1 = 15.

Example 3 GATE

F(A, B, C) = Σm(1, 2, 6, 7) is built on a 4:1 MUX with B and C as selects (B is S₁). What goes on I₀, I₁, I₂, I₃ (A is the data variable)?

Solution

BC = 00: m₀ = 0, m₄ = 0 → 0; 01: m₁ = 1, m₅ = 0 → A'; 10: m₂ = 1, m₆ = 1 → 1; 11: m₃ = 0, m₇ = 1 → A.

6 · GATE Traps

⚠️

  • Select bits are read as a binary number with S₁ as the MSB; the order matters.
  • With a 2ⁿ⁻¹:1 MUX each data input is 0, 1, x or x' for the leftover variable x.
  • A 2ⁿ:1 MUX tree needs 2ⁿ − 1 two-input MUXes (not 2ⁿ).
  • When reading a MUX circuit, include every input's select minterm, even those with 0 (they contribute nothing).

7 · Memory Hook

🧠

"Selects pick the input: Y = Σ mₖ(S)·Iₖ. Spare variable on the data lines: 0, 1, x or x'."

8 · Connect the Dots

A multiplexer chooses one input. The next lesson covers its mirror images: a decoder activates one output for each input code, an encoder does the reverse, and a demultiplexer sends one input to a chosen output.

9 · Self-Test

GATE format. Try every question before opening the vault.

Q1MCQ1 markEquation

A 2:1 MUX with select S and inputs I₀, I₁ has output:

  • (A) S(I₀ + I₁)
  • (B) S'I₀ + SI₁
  • (C) SI₀ + S'I₁
  • (D) I₀ ⊕ I₁

Q2MCQ2 marksReading

A 4:1 MUX has selects S₁ = A, S₀ = B and data inputs I₀ = 0, I₁ = 1, I₂ = 1, I₃ = 0. The function is:

  • (A) A ⊕ B
  • (B) A ⊙ B
  • (C) A + B
  • (D) AB

Q3NAT1 markTree

How many 2:1 multiplexers are needed to build an 8:1 multiplexer?

Numerical answer: ________

Q4MCQ2 marksImplementation

F(A, B, C) = Σm(1, 2, 6, 7) on a 4:1 MUX with selects A (S₁) and B (S₀). The data inputs I₀, I₁, I₂, I₃ are:

  • (A) C, C, 0, 1
  • (B) C', C, 1, 0
  • (C) C, C', 0, 1
  • (D) 0, 1, C, C'

Q5NAT2 marksReading

A 2:1 MUX has S = C, I₀ = A, I₁ = B. How many of the 8 rows of (A, B, C) give output 1?

Numerical answer: ________

10 · Rule Card

  • 2ⁿ:1 MUX: n selects; Y = Σ mₖ(S)·Iₖ. 2:1: Y = S'I₀ + SI₁.
  • Any n-variable function: 2ⁿ:1 MUX with the truth table on the inputs, or 2ⁿ⁻¹:1 MUX with inputs from {0, 1, x, x'}.
  • Reading a MUX: sum of select minterms times the inputs.
  • 2ⁿ:1 MUX from 2:1 MUXes: 2ⁿ − 1 of them.

11 · Concept Ledger

Unlocked in this lesson. From here on, these terms may be used.

multiplexerselect linesdata inputsMUX equationfunction implementation with a 2ⁿ:1 MUXimplementation with a 2ⁿ⁻¹:1 MUXreading a MUX circuitMUX treesMUX as a universal element

12 · Answer Vault

Answer Vault

Try the questions first. Open when you are ready to check.

Recall Warm-up

  • Pᵢ = Aᵢ ⊕ Bᵢ, Gᵢ = AᵢBᵢ.
  • Its minterms (1-rows).
  • No.

Self-Test

Q1 Answer: (B)1 mark

S = 0 picks I₀.

  • (A) is wrong: No.
  • (C) is wrong: Swapped.
  • (D) is wrong: No.

Re-read: Lesson 5.2.1 — Multiplexers, and implementing functions with them

Q2 Answer: (A)2 marks

Y = A'B + AB'.

  • (B) is wrong: Inverse.
  • (C) is wrong: Includes AB.
  • (D) is wrong: Only AB.

Re-read: Lesson 5.2.1 — Multiplexers, and implementing functions with them

Q3 Answer: 71 mark

2³ − 1.

Re-read: Lesson 5.2.1 — Multiplexers, and implementing functions with them

Q4 Answer: (C)2 marks

Rows 00: follows C; 01: opposite; 10: 0; 11: 1.

  • (A) is wrong: Row 01 is C', not C.
  • (B) is wrong: Inverted.
  • (D) is wrong: Wrong rows.

Re-read: Lesson 5.2.1 — Multiplexers, and implementing functions with them

Q5 Answer: 42 marks

Y = C'A + CB: rows 4, 6 (C = 0, A = 1) and 3, 7 (C = 1, B = 1).

Re-read: Lesson 5.2.1 — Multiplexers, and implementing functions with them

Ready for the next idea?

Mark this item complete when you’ve finished reading and working through it.