⚡ Interactive Logic Gate

XNOR Gate Simulator

Use the free XNOR Gate Simulator to test Exclusive NOR logic instantly. Switch Input A and Input B between 0 and 1 and watch the output update immediately. A two-input XNOR gate produces output 1 when both inputs are the same and output 0 when they are different.

✓ Interactive Inputs ✓ Instant Output ✓ Truth Table ✓ Equality Logic ✓ Free Unlimited Use
XNOR
2-Input XNOR Gate
● Live
Input A
0
XNOR
NOT(A XOR B)
Input B
0
Output Q
1
HIGH / TRUE
0 XNOR 0 = 1

What Is an XNOR Gate?

An XNOR gate is a digital logic gate that produces output 1 when its inputs have the same binary state. For two inputs, XNOR returns 1 for 0,0 and 1,1, while different inputs produce 0.

XNOR is the inverse of XOR. XOR detects a difference between two inputs, whereas XNOR detects equality. For this reason, XNOR is often described as an equivalence gate or equality detector.

Boolean rule: Q = NOT(A XOR B) Simple interpretation: Same inputs → 1
Different inputs → 0

XNOR Gate Truth Table

A standard two-input XNOR gate has four possible input combinations.

Input A Input B XOR XNOR Output
0 0 0 1
0 1 1 0
1 0 1 0
1 1 0 1
Core rule: a two-input XNOR gate outputs 1 when both inputs match.

How to Use the XNOR Gate Simulator

Select Input A

Choose either binary 0 or binary 1.

Select Input B

Set the second digital input to 0 or 1.

Compare the two states

XNOR checks whether Input A and Input B are identical.

Read Output Q

Matching inputs produce 1. Different inputs produce 0.

Test all combinations

Use the quick-case buttons to verify every row of the XNOR truth table.

XNOR Gate Input and Output Examples

0 XNOR 0

The inputs match, so the XNOR output is 1.

0 XNOR 1

The inputs are different, so the output becomes 0.

1 XNOR 0

The inputs differ, therefore the XNOR output is 0.

1 XNOR 1

Both inputs match, so the output becomes 1.

Why Does 0 XNOR 0 Equal 1?

XNOR is true when the two inputs are equal. Since both input states are 0, they match.

A = 0
B = 0
A XNOR B = 1

Why Does 1 XNOR 1 Equal 1?

The same equality rule applies when both inputs are HIGH.

A = 1
B = 1
A XNOR B = 1

XNOR does not care whether the shared value is 0 or 1. It tests whether the two values match.

Why Does 1 XNOR 0 Equal 0?

Input A and Input B have different states, so the equality condition is false.

1 XNOR 0 = 0

The same result occurs for 0 XNOR 1.

XNOR Boolean Expression

XNOR can be expressed in several equivalent ways.

Inverse XOR form: XNOR = NOT(A XOR B) Using AND, OR, and NOT: A XNOR B = (A AND B) OR ((NOT A) AND (NOT B))

The second expression directly describes the two matching cases: both inputs are 1, or both inputs are 0.

XNOR Gate vs XOR Gate

XNOR and XOR are exact opposites.

A B XOR XNOR
0001
0110
1010
1101
XOR detects inequality. XNOR detects equality.

Why Is XNOR Called an Equivalence Gate?

An equivalence relationship is true when two compared values are equal. The two-input XNOR truth table follows exactly that rule.

A = B → XNOR = 1
A ≠ B → XNOR = 0

That makes XNOR useful as a basic one-bit equality comparator.

XNOR as a One-Bit Comparator

Suppose a circuit needs to determine whether two single binary values are equal. XNOR performs the comparison directly.

A B Equal? XNOR
00Yes1
01No0
10No0
11Yes1

Comparing Multi-Bit Binary Values with XNOR

Multiple XNOR gates can compare corresponding positions of two binary values. If every pair of corresponding bits matches, all individual XNOR outputs will be 1.

Compare: A = 1011
B = 1011
Per-bit XNOR: 1 XNOR 1 = 1
0 XNOR 0 = 1
1 XNOR 1 = 1
1 XNOR 1 = 1

Those comparison results can then be combined with AND logic to determine whether the complete multi-bit values are identical.

XNOR and Binary Equality Checking

A multi-bit equality circuit commonly follows two conceptual stages:

Compare each bit pair with XNOR

Each matching pair generates 1.

Combine all comparison results

An AND operation can verify that every XNOR result equals 1.

Conceptually: Equal = XNOR(bit0) AND XNOR(bit1) AND XNOR(bit2) …

XNOR and XOR with NOT

Because XNOR is the inverse of XOR, an XOR gate followed by a NOT gate produces XNOR behavior.

X = A XOR B
Q = NOT X
Therefore: Q = A XNOR B

XNOR Gate Symbol

The XNOR gate symbol resembles an XOR gate with a small inversion bubble on the output.

That output bubble indicates that the XOR result is inverted before becoming the final XNOR output.

XNOR vs AND Gate

XNOR and AND both output 1 for input 1,1, but their behavior differs for 0,0.

A B AND XNOR
0001
0100
1000
1111

AND asks whether both inputs are 1. XNOR asks whether both inputs are equal.

XNOR vs OR Gate

OR asks whether at least one input is 1. XNOR instead asks whether both input states match.

A B OR XNOR
0001
0110
1010
1111

XNOR and Parity

Because XNOR is the inverse of XOR, it is closely related to parity logic. For two inputs, XNOR is 1 when the number of 1 inputs is even: either zero ones or two ones.

0 XNOR 0 = 1
1 XNOR 1 = 1

For larger parity networks, terminology and implementation depend on how multiple XOR or XNOR operations are grouped, so the intended parity convention should always be specified.

Useful XNOR Properties

Property Rule
Equal inputs A XNOR A = 1
Opposite of XOR XNOR = NOT(XOR)
Equality detector A = B → 1
Inequality A ≠ B → 0
Commutative A XNOR B = B XNOR A

XNOR in Digital Comparators

Digital comparators determine whether binary values are equal, greater than, or less than one another. XNOR is especially useful for equality because each corresponding bit pair can be tested independently.

If every corresponding pair matches, a final combination stage can assert an overall equality output.

A complete magnitude comparator may require additional logic to determine greater-than and less-than relationships. XNOR directly supports equality testing.

Three-Input XNOR: An Important Note

For more than two inputs, the phrase “all inputs equal” should not automatically be assumed to describe every multi-input XNOR implementation. A multi-input XNOR is commonly treated as the complement of repeated XOR, giving an even-parity function.

Repeated three-input XOR: A XOR B XOR C XNOR-style complement: NOT(A XOR B XOR C)
For this page, the interactive simulator intentionally demonstrates the standard and unambiguous two-input XNOR gate.

Where Are XNOR Gates Used?

Equality Comparators

Determine whether corresponding individual bits have the same value.

Digital Comparators

Combine multiple bit-equality results when comparing complete binary words.

Parity Logic

XNOR is closely related to even-parity functions and parity-checking networks.

Control Systems

Detect whether two binary conditions have matching states.

Digital Communication

Comparison and parity logic can use XOR/XNOR relationships for checking binary data.

Computer Science Education

XNOR helps explain equality, complementary logic, Boolean expressions, comparators, and the relationship between XOR and inversion.

Common XNOR Gate Mistakes

Thinking XNOR detects different inputs

That is XOR. XNOR produces 1 when the two inputs match.

Thinking only 1,1 produces output 1

XNOR also produces 1 for 0,0 because those inputs are equal.

Confusing XNOR with AND

AND asks whether both inputs are 1. XNOR asks whether the two inputs have the same state.

Forgetting that XNOR is inverted XOR

Every two-input XNOR result is the opposite of the corresponding XOR result.

Oversimplifying multi-input XNOR

For several inputs, repeated XOR followed by inversion behaves as an even-parity function. That is not identical to simply asking whether every input has the same value.

Related BinaryCon Tools

XNOR Gate Simulator FAQs

What is an XNOR gate?
An XNOR gate is the inverse of XOR. For two inputs, it produces output 1 when the two inputs are equal and output 0 when they differ.
What does XNOR stand for?
XNOR means Exclusive NOR, or equivalently the NOT of Exclusive OR.
What is 0 XNOR 0?
0 XNOR 0 = 1 because the inputs match.
What is 0 XNOR 1?
0 XNOR 1 = 0 because the inputs are different.
What is 1 XNOR 0?
1 XNOR 0 = 0.
What is 1 XNOR 1?
1 XNOR 1 = 1 because both inputs have the same state.
When does a two-input XNOR gate output 1?
It outputs 1 when Input A and Input B are equal: either 0,0 or 1,1.
Why is XNOR called an equality gate?
For two inputs, its output directly indicates equality: matching inputs produce 1 and different inputs produce 0.
What is the Boolean expression for XNOR?
A common expression is NOT(A XOR B). It can also be written as (A AND B) OR ((NOT A) AND (NOT B)).
What is the difference between XOR and XNOR?
XOR produces 1 for different inputs. XNOR produces 1 for matching inputs. Their two-input truth tables are exact opposites.
What is the difference between XNOR and AND?
AND is 1 only when both inputs are 1. XNOR is 1 for both 0,0 and 1,1.
Can XNOR compare binary values?
Yes. Individual XNOR gates can compare corresponding bits. Combining all comparison results with AND can determine whether complete multi-bit values are equal.
Is XNOR used in digital comparators?
Yes. Its equality-detection behavior makes XNOR useful in comparator circuits.
Is XNOR related to parity?
Yes. XNOR is the complement of XOR and is closely associated with even-parity logic, especially when XOR/XNOR operations are extended across multiple inputs.
Does A XNOR A always equal 1?
For a single binary value A compared with itself, yes: A XNOR A = 1.
Is a multi-input XNOR simply an all-equal detector?
Not generally. Repeated multi-input XNOR is commonly defined through the complement of XOR parity. For more than two inputs, even-parity behavior is not the same as requiring every input to be identical.
What does the circle on an XNOR symbol mean?
The output circle is an inversion bubble indicating that the XOR result is inverted.
Does this XNOR Gate Simulator require registration?
No. You can test every two-input XNOR combination directly without registration.

Test XNOR Gate Logic Instantly

Switch both inputs between 0 and 1, see the equality result immediately, study the complete XNOR truth table, and understand how Exclusive NOR is used in digital comparators, parity logic, equality checking, and Boolean circuits.

Scroll to Top