Equality detection in logic circuits: Which specialized gate outputs HIGH exactly when its two inputs are equal (both 0 or both 1)?

Difficulty: Easy

Correct Answer: exclusive-NOR

Explanation:


Introduction / Context:
Equality comparators form a foundation for digital systems: address matching, error detection, and control logic often require checking whether two bits (or vectors) are the same. At the single-bit level, one standard gate directly realizes equality.



Given Data / Assumptions:

  • Two binary inputs, A and B.
  • We want output = 1 when A = B, and output = 0 when A ≠ B.
  • Gate names use the “exclusive” family conventions.


Concept / Approach:
Exclusive-OR (XOR) outputs 1 when inputs differ. Exclusive-NOR (XNOR), being the logical complement of XOR, outputs 1 when inputs are the same and 0 otherwise. Thus, XNOR serves as a 1-bit equality detector. For multi-bit equality, XNOR is applied bitwise and the results are ANDed together.



Step-by-Step Solution:

Recall XOR truth: A⊕B = 1 for 01 and 10; 0 for 00 and 11.XNOR = NOT(XOR) → 1 for 00 and 11; 0 for 01 and 10.Equality condition matches XNOR exactly.Therefore, the equality gate is exclusive-NOR.


Verification / Alternative check:
Construct a small truth table for A, B, and outputs of XOR/XNOR to confirm which aligns with equality.



Why Other Options Are Wrong:

exclusive-AND / exclusive-NAND: Not standard gate types; distractors.exclusive-OR: Detects inequality, not equality.


Common Pitfalls:
Confusing XOR with XNOR; forgetting that XNOR is the equality operator in many HDLs (often written as A = B for vectors, but implemented via XNOR chains).


Final Answer:
exclusive-NOR

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion