Mux, Decoder and Encoder: GATE ECE practice questions with solutions
This topic covers multiplexers as function generators, decoder trees, priority encoders and magnitude comparators. The 15 original questions follow the GATE EC format: 9 MCQ, 2 MSQ and 4 NAT, from 5 easy, 7 medium and 3 hard.
Three ideas to know:
- Select lines form a binary index: n lines address 2ⁿ inputs.
- With the select lines as the high-order variables, each data input decides two adjacent rows of the truth table.
- A path through a multiplexer tree uses the select delay at the level where the select enters and data delays after that.
It helps GATE EC and ECE students revising Digital Circuits for the exam or a semester test. Helpful background: Multiplexers and Decoders. Start with the 5 easy questions, then work up to the 3 hard ones.
Related
Q.1
EasyMCQ1 mark
How many select lines does a 32-to-1 multiplexer need?
Show answer and solutionHide answer and solution
Answer: (C)
Key idea: Select lines form a binary index: n lines address 2ⁿ inputs.
1. n select lines choose among 2ⁿ inputs. 2. 2⁵ = 32, so 5 select lines are needed.
Common mistake: Giving each input its own select line gives 32, option (A).
You need: Multiplexers, binary numbers
Q.2
EasyMCQ1 mark
A 3-to-8 decoder has inputs A2 (MSB), A1 and A0 (LSB) and active-HIGH outputs Y0 to Y7. With A2 A1 A0 = 1 1 0, which output is HIGH?
Show answer and solutionHide answer and solution
Answer: (B)
Key idea: A decoder raises the output whose number equals the binary input.
1. The input word is 110₂. 2. 110₂ = 4 + 2 + 0 = 6.
3. So Y6 is HIGH and every other output is LOW.
Common mistake: Reading A0 as the most significant bit turns 110 into 011 = 3 and gives Y3, option (A).
You need: Decoders, binary weights
Q.3
EasyNAT1 mark
The minimum number of 2-to-1 multiplexers needed to build a 16-to-1 multiplexer is ______.
Numerical answer: type a number.
Show answer and solutionHide answer and solution
Answer: 15
Key idea: A binary tree that reduces N inputs to 1 needs N − 1 two-input nodes.
1. A tree of 2-to-1 multiplexers halves the number of signals at each level.
2. Level 1 uses 8, level 2 uses 4, level 3 uses 2 and level 4 uses 1. 3. 8 + 4 + 2 + 1 = 15.
Common mistake: Counting only the first level, 16 ÷ 2 = 8.
You need: Multiplexer trees
Q.4
EasyMCQ1 mark
An 8-to-3 priority encoder gives the highest-numbered active input priority. Inputs D2, D3 and D5 are HIGH and all others are LOW. The output Y2 Y1 Y0 is
Show answer and solutionHide answer and solution
Answer: (C)
Key idea: A priority encoder reports only the highest-priority active input.
1. The highest active input is D5.
2. The encoder outputs 5 in binary: 101.
Common mistake: Encoding the lowest active input, D2, gives 010, option (A).
You need: Encoders, priority
Q.5
EasyMCQ1 mark
For a 1-bit magnitude comparator with inputs A and B, the output for A > B is
Show answer and solutionHide answer and solution
Answer: (A)
Key idea: Each comparator output is the set of rows where its relation holds.
1. A > B holds for one combination only: A = 1 and B = 0.
2. That single row is the product term AB′.
Common mistake: Taking A ⊕ B, option (D), which is 1 whenever A ≠ B, including A < B.
You need: Comparators, truth tables
Q.6
MediumMCQ2 marks
For the single 4-to-1 multiplexer described in the figure, the output F(A, B, C) equals
Show answer and solutionHide answer and solution
Answer: (D)
Key idea: With the select lines as the high-order variables, each data input decides two adjacent rows of the truth table.
1. AB = 00 selects I0 = C: F = 1 at ABC = 001 (m1).
2. AB = 01 selects I1 = C′: F = 1 at 010 (m2).
3. AB = 10 selects 0: no minterms.
4. AB = 11 selects 1: m6 and m7.
5. F = Σm(1, 2, 6, 7).
Common mistake: Swapping the select lines (treating B as S1) makes AB = 10 select I1 = C′ and gives Σm(1, 4, 6, 7), option (A).
You need: Multiplexer-based function realization
Q.7
MediumNAT2 marks
A 4-bit magnitude comparator compares unsigned numbers A and B (each 0 to 15). For how many of the 256 ordered pairs (A, B) is the output A > B equal to 1? ______
Numerical answer: type a number.
Show answer and solutionHide answer and solution
Answer: 120
Key idea: Remove the equal cases first; the rest split evenly.
1. 16 of the 256 pairs have A = B.
2. The remaining 240 split evenly between A > B and A < B by symmetry. 3. 240 ÷ 2 = 120.
Common mistake: Taking half of all 256 pairs, 128, which counts the equal cases on one side.
You need: Comparators, counting
Q.8
MediumMCQ1 mark
The 8 active-HIGH outputs Y0 to Y7 of a 3-to-8 decoder with inputs A (MSB), B and C (LSB) are used to build F. A 4-input OR gate takes Y1, Y2, Y4 and Y7, and its output is F. Then F equals
Show answer and solutionHide answer and solution
Answer: (B)
Key idea: A decoder plus an OR gate realizes any sum of minterms directly.
1. The OR gate gives F = Σm(1, 2, 4, 7).
2. Those minterms are 001, 010, 100, 111, each with an odd number of 1s.
3. So F = A ⊕ B ⊕ C, the full adder sum.
Common mistake: Mixing up the full adder's sum and carry lists: the carry is Σm(3, 5, 6, 7) = AB + BC + CA, option (A).
You need: Decoders, minterms, full adder
Q.9
MediumMSQ2 marks
Complemented inputs (A′, B′, C′) and the constants 0 and 1 are available. Which of the following can, on their own, realize every Boolean function F(A, B, C)?
One or more options are correct.
Show answer and solutionHide answer and solution
Answer: (B), (C) and (D)
Key idea: A 2ⁿ-to-1 multiplexer can realize any function of n + 1 variables when the last variable or its complement can feed the data inputs.
1. A 2-to-1 multiplexer gives F = A′X + AY with X, Y single literals or constants; F = A′(B ⊕ C) cannot be written that way, so (A) fails.
2. An 8-to-1 multiplexer is a full truth table, so (B) works.
3. For each AB, F as a function of C is 0, 1, C or C′, so (C) works.
4. The decoder makes every minterm and the OR sums the ones needed, so (D) works.
Common mistake: Expecting the 2-to-1 trick to stretch to three variables and choosing (A); with only single literals on the data inputs, each half can depend on just one of B and C.
You need: Multiplexers, decoders, Shannon expansion
Q.10
MediumMCQ2 marks
A 4-to-16 decoder is built from two 3-to-8 decoders with active-HIGH enables. Inputs A2, A1, A0 go to both decoders; A3 drives the enable of decoder P directly and the enable of decoder Q through an inverter. For the input A3 A2 A1 A0 = 1011, which output goes HIGH?
Show answer and solutionHide answer and solution
Answer: (A)
Key idea: The extra input bit chooses which decoder is enabled; the shared bits choose the line inside it.
1. A3 = 1 enables P and disables Q (its enable is A3′ = 0).
2. The lower bits A2 A1 A0 = 011 = 3.
3. So output 3 of decoder P goes HIGH; it stands for overall line 8 + 3 = 11.
Common mistake: Reading A2 A1 A0 = 011 with A0 as the MSB gives 110 = 6, option (C).
You need: Decoders with enable, decoder expansion
Q.11
MediumNAT1 mark
Using only 3-to-8 decoders that have an enable input, the minimum number needed to build a 6-to-64 decoder as a two-level tree is ______.
Numerical answer: type a number.
Show answer and solutionHide answer and solution
Answer: 9
Key idea: A decoder tree needs decoders at every level, including the one that drives the enables.
1. The output level needs 64 ÷ 8 = 8 decoders, each enabled by one line.
2. One more 3-to-8 decoder, driven by the top 3 input bits, provides those 8 enables.
3. Total 8 + 1 = 9.
Common mistake: Counting only the 8 output decoders and forgetting the enable-driving decoder gives 8.
You need: Decoder expansion
Q.12
MediumMCQ2 marks
For the cascade of two 2-to-1 multiplexers described in the figure, the output F(A, B, C) equals
Show answer and solutionHide answer and solution
Answer: (C)
Key idea: When a mux output feeds another mux, substitute the select value first to simplify each branch.
1. X = A′B + AC.
2. F = B′X + BA′.
3. With B = 0, X = AC, so F = AC: ABC = 101 (m5).
4. With B = 1, F = A′: ABC = 010 and 011 (m2, m3).
5. F = Σm(2, 3, 5).
Common mistake: Swapping M2's inputs (A′ when B = 0, X when B = 1) gives F = A′B′ + A′B + ABC = Σm(0, 1, 2, 3, 7), option (A).
You need: Multiplexers, Boolean algebra
Q.13
HardNAT2 marks
A 16-to-1 multiplexer is built as a two-level tree of 4-to-1 multiplexers: four in the first level, selected by S1 S0, and one in the second level, selected by S3 S2. Each 4-to-1 multiplexer has a select-to-output delay of 3 ns and a data-to-output delay of 2 ns. The worst-case delay from any select input to the final output is ______ ns.
Numerical answer: type a number.
Show answer and solutionHide answer and solution
Answer: 5
Key idea: A path through a multiplexer tree uses the select delay at the level where the select enters and data delays after that.
1. S3 and S2 act only on the second level: 3 ns.
2. S1 and S0 act on the first level (3 ns to its outputs), and that change then travels through the second level's data path (2 ns).
3. Total 3 + 2 = 5 ns, which is the worst case.
Common mistake: Adding the select delay at both levels, 3 + 3 = 6 ns, although S1 S0 never reach the second level's select pins.
You need: Multiplexer trees, propagation delay
Q.14
HardMCQ2 marks
A 4-input priority encoder gives D3 the highest priority and D0 the lowest, with outputs Y1 Y0 (the index of the highest active input) and a valid bit V. The minimal expression for Y0 is
Show answer and solutionHide answer and solution
Answer: (D)
Key idea: In a priority encoder, a lower input matters only when every higher input is inactive.
1. Y0 is 1 when the winning index is 1 or 3.
2. Index 3 wins whenever D3 = 1.
3. Index 1 wins when D3 = 0, D2 = 0 and D1 = 1: D3′D2′D1.
4. Y0 = D3 + D3′D2′D1 = D3 + D2′D1.
Common mistake: Ignoring the priority and writing the plain encoder output D3 + D1, option (A), which gives Y0 = 1 for D2 = D1 = 1 although index 2 wins.
You need: Priority encoders
Q.15
HardMSQ2 marks
A 2-bit comparator compares A = A1A0 with B = B1B0 (unsigned). Which of the following statements are true?
One or more options are correct.
Show answer and solutionHide answer and solution
Answer: (A), (B) and (C)
Key idea: A lower bit can decide a comparison only when every higher bit is equal.
1. Equal means each bit pair is equal, so (A) is true.
2. A > B if the MSBs decide it (A1 = 1, B1 = 0), or they tie and the LSBs decide it, so (B) is true.
3. Of the 16 pairs, 4 are equal and the other 12 split evenly, so 6 have A > B and (C) is true.
4. A1′B1 + A0′B0 is 1 for A = 10, B = 01 (the second term), although A > B there, so (D) is false.
Common mistake: Writing A < B as an OR of bitwise comparisons without the 'higher bits equal' condition, which makes (D) look right.
You need: Magnitude comparators
Past GATE questions on this topic
- GATE 2023 EC, Q.23: Multiplexers (1 mark, MCQ)
- GATE 2024 EC, Q.40: Priority encoder (2 marks, MCQ)
- GATE 2026 EC, Q.48: Multiplexer logic (2 marks, MCQ)