Exclusive-NOR as an equality detector Why is an exclusive-NOR (XNOR) gate also referred to as an equality gate?

Difficulty: Easy

Correct Answer: The output is true if the inputs are equal.

Explanation:


Introduction / Context:
In digital logic, comparators detect when two signals match. The exclusive-NOR (XNOR) gate implements the simplest 1-bit equality function, making it a building block for multi-bit equality comparators.


Given Data / Assumptions:

  • XNOR truth table yields 1 when inputs are the same (00 or 11).
  • Opposite inputs (01 or 10) produce 0.
  • Inputs are single-bit logical values.


Concept / Approach:
Equality means A equals B. The Boolean function for equality is X = A XNOR B. This can also be written as X = (A AND B) OR (NOT A AND NOT B).


Step-by-Step Solution:

List pairs: (0,0) → 1, (0,1) → 0, (1,0) → 0, (1,1) → 1.Observe that output is 1 exactly when inputs match.Therefore, the device directly tests for equality of two bits.This property generalizes: cascading bitwise XNORs and ANDing the results yields n-bit equality.


Verification / Alternative check:
Algebraic form X = A*B + A'*B' matches the equality condition because each product term covers one of the equal-input cases.


Why Other Options Are Wrong:

  • The output is false if the inputs are equal: This describes XOR, not XNOR.
  • The output is true if the inputs are opposite: Also describes XOR, not XNOR.


Common Pitfalls:
Confusing XOR and XNOR symbols or names, and forgetting that the bar (or bubble) on XOR indicates inversion of the XOR result.


Final Answer:
The output is true if the inputs are equal.

Discussion & Comments

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