Equality detection: Which gate provides a HIGH output exactly when its two inputs have equal logic levels (both 0 or both 1)?

Difficulty: Easy

Correct Answer: XNOR gate

Explanation:


Introduction / Context:
Comparing two binary signals is a common task. The equality function outputs HIGH when inputs match. Recognizing which primitive gate directly implements equality simplifies design work for comparators and parity logic.


Given Data / Assumptions:

  • Two-input standard logic gates under positive logic.
  • Goal is equality detection (A = B).


Concept / Approach:
By definition, XOR is HIGH when inputs differ; therefore its complement, XNOR, is HIGH when inputs are equal. The XNOR truth table places 1s at (0,0) and (1,1) and 0s at (0,1) and (1,0).


Step-by-Step Solution:

Recall XOR identity: XOR = A′B + AB′ (different).XNOR = (XOR)′ = A′B′ + AB (equal).Thus, for equality detection, choose XNOR.No additional logic is required for the two-input case.


Verification / Alternative check:
Build a small truth table or evaluate A′B′ + AB for all four input pairs; outputs are 1 only on equality rows, confirming XNOR.


Why Other Options Are Wrong:

  • XOR: Detects inequality.
  • NAND/NOR/AND: Do not implement equality; their truth tables do not match equality-only HIGH behavior.


Common Pitfalls:
Confusing XOR with XNOR; attempting to build equality with AND/OR and inverters when a single XNOR suffices.


Final Answer:
XNOR gate

More Questions from Combinational Logic Circuits

Discussion & Comments

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