Difficulty: Easy
Correct Answer: Exclusive-OR
Explanation:
Introduction / Context:
A basic comparator for a single bit examines two logic inputs and indicates whether they are equal or different. In digital electronics, certain simple gates can serve as the core of such a comparison, and understanding which gate does what is essential for designing larger equality/inequality comparators.
Given Data / Assumptions:
Concept / Approach:
The Exclusive-OR (XOR) gate outputs HIGH when the inputs are different and LOW when the inputs are the same. This directly provides an inequality indication. If an equality indication is required instead, an inverter (NOT) after XOR or, equivalently, an Exclusive-NOR (XNOR) gate can be used. Thus, XOR is a natural choice for a basic comparator core because it performs the comparison in a single gate stage for inequality detection.
Step-by-Step Solution:
Verification / Alternative check:
Build a 2-bit comparator: X0 = A0 XOR B0, X1 = A1 XOR B1; inequality = X0 OR X1. This scales with bit-width and confirms XOR's role as the comparison primitive.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing XOR (difference detector) with XNOR (equality detector). Both are related; XOR is typically cited as the basic comparator element because it directly flags mismatches.
Final Answer:
Exclusive-OR
Discussion & Comments