Exclusive-OR (XOR) behavior For a standard 2-input exclusive-OR gate, under which condition does the output go HIGH (logic 1)?
-
Aall inputs are LOW
-
Ball inputs are HIGH
-
Cthe inputs are unequal
-
Dnone of the above
Answer
Correct Answer: the inputs are unequal
Explanation
Introduction / Context:The exclusive-OR (XOR) gate is central to parity generation, adders, and data comparison circuits. Knowing its defining condition helps when analyzing arithmetic logic units and error-checking networks.
Given Data / Assumptions:
- 2-input XOR with inputs A and B; output X.
- Logic levels are ideal 0 or 1.
- Definition: XOR outputs 1 if exactly one input is 1.
Concept / Approach:The canonical expression for XOR is X = A * NOT B + NOT A * B. This evaluates to 1 when the inputs differ (one HIGH, one LOW). When both are the same (both 0 or both 1), each product term becomes 0, yielding X = 0.
Step-by-Step Solution:Case A=0, B=0 → X = 0 * 1 + 1 * 0 = 0.Case A=0, B=1 → X = 0 * 0 + 1 * 1 = 1.Case A=1, B=0 → X = 1 * 1 + 0 * 0 = 1.Case A=1, B=1 → X = 1 * 0 + 0 * 1 = 0.
Verification / Alternative check:XOR may be viewed as “inequality detector.” If A ≠ B, output is 1; if A = B, output is 0. This matches the gate’s symbol and widespread usage in comparators.
Why Other Options Are Wrong:
- “all inputs are LOW” gives output 0 with XOR.
- “all inputs are HIGH” also gives output 0.
- “none of the above” is invalid because “inputs are unequal” is the correct defining property.
Common Pitfalls:
- Confusing XOR with OR. OR is HIGH when any input is HIGH, including both HIGH; XOR is LOW when both are HIGH.
- Assuming XOR is just “either input” without excluding “both.”
Final Answer:the inputs are unequal