Difficulty: Easy
Correct Answer: AND gates, OR gates, and NOT gates
Explanation:
Introduction / Context:
Many digital designs restrict the primitive gate set to AND, OR, and NOT (or to NAND/NOR). Being able to build XOR from these primitives is essential because XOR underlies adders, parity generators, and data comparison logic.
Given Data / Assumptions:
Concept / Approach:
One canonical realization is: XOR = (A * NOT B) + (NOT A * B). This uses two AND gates and two NOT gates feeding an OR gate. It exactly captures the “one or the other but not both” behavior of XOR.
Step-by-Step Solution:
Verification / Alternative check:
Truth table check: For A,B = 00 → Y=0; 01 → Y=1; 10 → Y=1; 11 → Y=0. This matches XOR. Alternative forms exist using only NAND or only NOR, but they still conceptually reduce to combinations of AND/OR/NOT operations.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing XOR with inclusive OR; XOR excludes the 11 case. Also, forgetting to invert one input per product term yields the wrong function.
Final Answer:
AND gates, OR gates, and NOT gates
Discussion & Comments