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.
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.
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 |
How to Use the XNOR Gate Simulator
Choose either binary 0 or binary 1.
Set the second digital input to 0 or 1.
XNOR checks whether Input A and Input B are identical.
Matching inputs produce 1. Different inputs produce 0.
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.
B = 0
A XNOR B = 1
Why Does 1 XNOR 1 Equal 1?
The same equality rule applies when both inputs are HIGH.
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.
The same result occurs for 0 XNOR 1.
XNOR Boolean Expression
XNOR can be expressed in several equivalent ways.
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 |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
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 = 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 |
|---|---|---|---|
| 0 | 0 | Yes | 1 |
| 0 | 1 | No | 0 |
| 1 | 0 | No | 0 |
| 1 | 1 | Yes | 1 |
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.
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:
Each matching pair generates 1.
An AND operation can verify that every XNOR result equals 1.
XNOR and XOR with NOT
Because XNOR is the inverse of XOR, an XOR gate followed by a NOT gate produces XNOR behavior.
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 |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 0 |
| 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
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 |
|---|---|---|---|
| 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 |
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.
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.
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.
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
That is XOR. XNOR produces 1 when the two inputs match.
XNOR also produces 1 for 0,0 because those inputs are equal.
AND asks whether both inputs are 1. XNOR asks whether the two inputs have the same state.
Every two-input XNOR result is the opposite of the corresponding XOR result.
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?
What does XNOR stand for?
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?
Why is XNOR called an equality gate?
What is the Boolean expression for XNOR?
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?
What is the difference between XNOR and AND?
Can XNOR compare binary values?
Is XNOR used in digital comparators?
Is XNOR related to parity?
Does A XNOR A always equal 1?
A XNOR A = 1.
Is a multi-input XNOR simply an all-equal detector?
What does the circle on an XNOR symbol mean?
Does this XNOR Gate Simulator require 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.