XNOR — Definition, Formula & Examples
XNOR is a logic operation that returns true when both inputs have the same value — both true or both false. It is the negation of the XOR (exclusive or) gate.
The XNOR operation on two propositions and is defined as . It yields true if and only if and share the same truth value, making it logically equivalent to the biconditional .
Key Formula
Where:
- = First Boolean input (true or false)
- = Second Boolean input (true or false)
- = XNOR operator
- = Logical AND (conjunction)
- = Logical OR (disjunction)
- = Logical NOT (negation)
How It Works
XNOR checks whether two inputs agree. If both are true or both are false, the output is true; if the inputs differ, the output is false. You can think of it as an "equality detector" for truth values. In circuit diagrams, XNOR is drawn as an XOR gate with a small circle (bubble) on the output, representing negation.
Worked Example
Problem: Evaluate P XNOR Q for all combinations of truth values of P and Q.
Case 1: P = T, Q = T. Both inputs match, so the output is true.
Case 2: P = T, Q = F. The inputs differ, so the output is false.
Case 3: P = F, Q = T. The inputs differ again, so the output is false.
Case 4: P = F, Q = F. Both inputs match, so the output is true.
Answer: The XNOR truth table: TT→T, TF→F, FT→F, FF→T.
Why It Matters
XNOR gates are used in digital circuits to test whether two signals are equal, which is essential in error-detection systems and comparators. In discrete math and proof-writing courses, recognizing that XNOR is equivalent to the biconditional helps you simplify logical expressions and construct truth tables more efficiently.
Common Mistakes
Mistake: Confusing XNOR with XOR by thinking "both true" gives false.
Correction: XNOR is the opposite of XOR. XNOR outputs true when both inputs match (both true or both false) and false when they differ.
