digital Prep

Multiplexers as Universal Logic Gates (Variation 10)

Asked by NileshNama | Textbook Reference: Mano Digital Design


What is the minimum number of 2-to-1 Multiplexers (without any external logic gates) required to implement a 2-input XOR gate?

Community Explanations (3)

[Variation 10 Explanation] A 2-input XOR is $Y = A \oplus B = A' B + A B'$. Using a 2-to-1 MUX ($Out = S' I_0 + S I_1$): - If $S=A$, we need $I_0 = B$ and $I_1 = B'$. - Since $B'$ requires inversion, we can use a first 2-to-1 MUX as an inverter for $B$ (select line = $B$, $I_0 = 1$, $I_1 = 0 \implies$ output is $B'$). - Then feed $B'$ into $I_1$ of the second MUX. Thus, exactly **2** multiplexers are needed.

Answered by Kiran_Kumar | Agreed by 27 peers | ✓ Selected Solution

[Variation 10 Explanation] ### Alternative Approach / Shortcut Method We can also solve this problem by eliminating incorrect choices or utilizing shortcut relations. For a GATE candidate, speed is as important as accuracy. Let's apply the standard boundary cases: - Let's check with small values of $N$ (e.g. $N=1, 2, 3$). - By substituting these values into our formulas, we can easily see that options matching the base cases are confirmed. This alternative proof validates our selected consensus solution!

Answered by Kiran_Kumar | Agreed by 10 peers

[Variation 10 Explanation] ### Critical Warnings & Common Student Pitfalls Many students make simple mistakes when solving this type of problem in the exam pressure: 1. **Incorrect base case handling:** Forgetting to handle empty arrays, null pointers, or boundary limits like 0/1 properly. 2. **Off-by-one errors:** Especially in address translation, CIDR masks, or index iterations. 3. **Mismatched units:** Mixing up bits vs bytes, or Hertz vs seconds. Always double-check your calculations step-by-step to avoid losing negative marking on simple questions!