LearnGates

The XNOR gate (equality gate)

The XNOR gate is an XOR followed by a NOT. It gives 1 when its two inputs are the same (both 0 or both 1) and 0 when they differ. That is why it is also called the equality gate.

Formula Y = (A ⊕ B)‾

Truth table

Truth table of XNOR
ABY
001
010
100
111

Try it Click the inputs to change them.

Y1

Where it is used

Whenever two values must be compared: one XNOR per bit tells whether that bit matches. Join the results with an AND and you know whether two whole numbers are equal. Try it in the equality comparator challenge.