XNOR Gate Truth Table Made Simple

The XNOR gate truth table is a foundational concept in digital electronics. An XNOR gate (exclusive-NOR) outputs a HIGH (1) when its inputs are equal and LOW (0) when they differ. Understanding this logic is essential for designing and analyzing digital circuits.

XNOR gate truth table explained, 2-Input and 3-Input XNOR: In this guide, we explain how XNOR logic works, walk through the 2-input XNOR gate truth table, and expand to the 3-input XNOR gate truth table with examples.


Table of Contents

What Is the XNOR Gate Truth Table?

The quick answer is that the XNOR gate truth table defines the output of an XNOR gate for every possible input combination. For a 2-input gate, the output is 1 when both inputs are the same, that is, either 0 and 0 or 1 and 1. For all other combinations, the output is 0.

The longer explanation is that the XNOR gate truth table defines how the output responds to every possible combination of inputs. At its core, this gate checks whether the inputs are equal. When all inputs match, the output is HIGH (1); when they differ, the output becomes LOW (0). This makes the XNOR gate especially valuable when building circuits that rely on comparison or matching logic.

Beyond its basic definition, the truth table also helps illustrate how the XNOR gate behaves in larger digital systems. For instance, when multiple XNOR gates are connected in series, the equality-checking behavior extends across multiple bits, allowing designers to compare binary numbers or detect when two signals follow the same pattern. Understanding the truth table is therefore more than memorizing rows of values, it’s recognizing the principle that identical inputs produce a positive result.

This concept also extends into more advanced digital designs such as arithmetic units, communication circuits, and verification logic. By using the truth table as a reference, engineers can predict how a system will behave under all possible input conditions, ensuring accuracy and reliability in their digital designs.


2-Input XNOR Gate Truth Table Explanation

A 2-input XNOR gate is the simplest and most common form of the equivalence gate. It compares two binary inputs and produces a HIGH output when the inputs match. This makes it a fundamental building block for circuits that need to verify whether two signals are identical, such as digital comparators and error-checking systems.

2-Input XNOR Gate Truth Table

The following truth table shows outputs of a 2-input XNOR gate for all possible input combinations. The image below is the symbol used to represent a 2-input XNOR gate with inputs A and B, and output Y, corresponding to the inputs and output in the truth table.

Input AInput BOutput (A XNOR B)
001
010
100
111
The 2-Input XNOR Gate Truth Table
XNOR gate truth table symbol
2-Input XNOR Gate Symbol

2-Input XNOR Gate Boolean Expression

After reviewing the truth table, it becomes clear that the 2-input XNOR gate follows a straightforward rule: matching inputs yield 1, mismatched inputs yield 0. This simplicity also makes the gate easy to analyze mathematically as shown in the following Boolean expression.

Y = A ⊙ B = A·B + A′·B′

You can apply this equation in many scenarios. For example, if A = 1 and B = 1, the term A·B evaluates to 1, resulting in a HIGH output. If both A and B are 0, the term A′·B′ becomes 1 while A·B becomes 0, again producing a HIGH output. When the values differ, such as A = 1 and B = 0, both terms evaluate to 0, resulting in a LOW output. This makes it easy to compute outputs manually when solving logic problems or designing circuits. The following table shows all the calculations for a 2-input XNOR gate.

Substitution Into EquationResultExplanation
0·0 + 0′·0′10·0 = 0. The complements are 0′=1 and 0′=1, so 1·1 = 1. Final: 0 + 1 = 1. Inputs match → output HIGH.
0·1 + 0′·1′00·1 = 0. Complements: 0′=1, 1′=0, so 1·0 = 0. Final: 0 + 0 = 0. Inputs differ → output LOW.
1·0 + 1′·0′01·0 = 0. Complements: 1′=0, 0′=1, so 0·1 = 0. Final: 0 + 0 = 0. Inputs differ → output LOW.
1·1 + 1′·1′11·1 = 1. Complements: 1′=0, 1′=0, so 0·0 = 0. Final: 1 + 0 = 1. Inputs match → output HIGH.

Practical uses of this equation include simplifying combinational logic circuits, analyzing FPGA designs, and evaluating bitwise operations when writing firmware or HDL code. It also serves as a foundation when expanding the logic to multi-input XNOR gates.


3-Input XNOR Gate Truth Table Explanation

When dealing with 3-input XNOR gates, the logic becomes more complex. The gate outputs 1 only when the number of HIGH (1) inputs is even.

A 3-input XNOR gate follows the same equivalence principle but extends it to three variables. Instead of simply checking whether two signals match, it determines whether all inputs collectively contain an even number of HIGH values. If the count of 1s is even, the output is HIGH; if the count is odd, the output becomes LOW. This makes the multi-input XNOR useful in parity-related applications and error-checking logic.

Because the logic now depends on the number of HIGH inputs rather than strict equality, this version of the XNOR gate can perform more advanced functions. For example, engineers can use it to detect even parity in multi-bit systems. Parity logic is crucial in communication protocols, memory systems, and data-transmission hardware where validating data integrity is essential.

Another important insight is that multi-input XNOR gates can be built by cascading smaller XNOR gates. This modular approach makes it easier to scale the logic across larger systems. It also allows designers to adapt XNOR functionality to various applications, from binary comparators to control logic, depending on how many inputs need to be evaluated.

3-Input XNOR Gate Truth Table

Before examining the table, it’s helpful to think about how multi-input XNOR logic builds on the 2-input version. Instead of comparing only two inputs, the 3-input XNOR gate effectively checks whether the system maintains an even level of HIGH values. This understanding makes it easier to read and interpret each row of the truth table and apply the logic to real-world circuit design.

The truth table clearly shows that the output becomes HIGH when the number of HIGH inputs equals 0 or 2. This even-parity behavior allows the gate to be used in systems that require parity matching, pattern detection, or multi-bit comparison. Because of this, 3-input and higher XNOR gates can simplify logic equations in digital systems that process several signals simultaneously.

ABCOutput (A ⊙ B ⊙ C)
0001
0010
0100
0111
1000
1011
1101
1110
The 3-Input XNOR Gate Truth Table

3-Input XNOR Gate Boolean Expression

The 3 input XNOR gate truth table shows that the output is HIGH when the number of 1s in the inputs is even (0, 2). The boolean expression for a 3-input XNOR gate is:

Y = A ⊙ B ⊙ C = A′·B′·C′ + A·B′·C + A′·B·C + A·B·C

The above equation is used in the table below for all possible inputs of a 3-input XNOR gate.

Substitution Into EquationResultExplanation
0′·0′·0′ + 0·0′·0 + 0′·0·0 + 0·0·0′1Evaluate terms: 0′·0′·0′ = 1·1·1 = 1; 0·0′·0 = 0·1·0 = 0; 0′·0·0 = 1·0·0 = 0; 0·0·0′ = 0·0·1 = 0. Sum: 1 + 0 + 0 + 0 = 1. (All inputs 0 → even → HIGH.)
0′·0′·1′ + 0·0′·1 + 0′·0·1 + 0·0·1′00′·0′·1′ = 1·1·0 = 0; 0·0′·1 = 0·1·1 = 0; 0′·0·1 = 1·0·1 = 0; 0·0·1′ = 0·0·0 = 0. Sum: 0 + 0 + 0 + 0 = 0. (One 1 → odd → LOW.)
0′·1′·0′ + 0·1′·0 + 0′·1·0 + 0·1·0′00′·1′·0′ = 1·0·1 = 0; 0·1′·0 = 0·0·0 = 0; 0′·1·0 = 1·1·0 = 0; 0·1·0′ = 0·1·1 = 0. Sum: 0 + 0 + 0 + 0 = 0. (One 1 → odd → LOW.)
0′·1′·1′ + 0·1′·1 + 0′·1·1 + 0·1·1′10′·1′·1′ = 1·0·0 = 0; 0·1′·1 = 0·0·1 = 0; 0′·1·1 = 1·1·1 = 1; 0·1·1′ = 0·1·0 = 0. Sum: 0 + 0 + 1 + 0 = 1. (Two 1s → even → HIGH.)
1′·0′·0′ + 1·0′·0 + 1′·0·0 + 1·0·0′01′·0′·0′ = 0·1·1 = 0; 1·0′·0 = 1·1·0 = 0; 1′·0·0 = 0·0·0 = 0; 1·0·0′ = 1·0·1 = 0. Sum: 0 + 0 + 0 + 0 = 0. (One 1 → odd → LOW.)
1′·0′·1′ + 1·0′·1 + 1′·0·1 + 1·0·1′11′·0′·1′ = 0·1·0 = 0; 1·0′·1 = 1·1·1 = 1; 1′·0·1 = 0·0·1 = 0; 1·0·1′ = 1·0·0 = 0. Sum: 0 + 1 + 0 + 0 = 1. (Two 1s → even → HIGH.)
1′·1′·0′ + 1·1′·0 + 1′·1·0 + 1·1·0′11′·1′·0′ = 0·0·1 = 0; 1·1′·0 = 1·0·0 = 0; 1′·1·0 = 0·1·0 = 0; 1·1·0′ = 1·1·1 = 1. Sum: 0 + 0 + 0 + 1 = 1. (Two 1s → even → HIGH.)
1′·1′·1′ + 1·1′·1 + 1′·1·1 + 1·1·1′01′·1′·1′ = 0·0·0 = 0; 1·1′·1 = 1·0·1 = 0; 1′·1·1 = 0·1·1 = 0; 1·1·1′ = 1·1·0 = 0. Sum: 0 + 0 + 0 + 0 = 0. (Three 1s → odd → LOW.)

Understanding the XNOR Table in Logic Design

The XNOR truth table is more than a reference chart, it acts as a design tool that helps engineers understand how equality logic can shape the behavior of digital circuits. By studying how inputs map to outputs, designers can determine where the XNOR gate fits into complex systems, such as multi-bit comparators or arithmetic circuits that rely on signal matching.

The XNOR gate plays an important role in several areas of digital logic design, including:

  • Digital comparators (checking whether two binary numbers are equal)
  • Error-checking circuits (detecting mismatches in communication systems)
  • Control logic that relies on equivalence or synchronization
  • Parity checkers and parity generators
  • Phase detection circuits in clock and data recovery systems
  • Bitwise equality operations in microprocessors and ALUs
  • Pattern-recognition circuits in embedded or machine-logic systems

Understanding the truth table allows designers to simplify Boolean expressions and create more efficient circuit implementations. It also helps when writing HDL code for FPGA or ASIC designs where logical accuracy is crucial.


Tips for the XNOR Gate Truth Table

When learning how XNOR truth tables work, it helps to keep a few guiding principles in mind. These insights make it easier to remember how the gate functions and how to apply it in real-world circuit design.

Here are helpful tips to strengthen your understanding:

  • Think of XNOR as an “equivalence detector”, that is, it outputs HIGH when inputs match.
  • Remember that XNOR is the complement of XOR, so every output is the opposite of what XOR would produce.
  • Visualize the Boolean form: A·B + A′·B′. It is a quick way to confirm whether inputs are equal.
  • For three or more inputs, count the number of HIGH signals; if it’s even, the output is HIGH.
  • When testing logic circuits, write out all combinations manually to ensure correctness.
  • Use truth tables to simplify or verify Boolean expressions during design.
  • When debugging HDL code, check multi-input parity behavior to spot errors related to XNOR logic.

These tips help reinforce how the XNOR gate behaves under various conditions, making the logic easier to apply across different engineering tasks.


Did You Know About the XNOR Gate Truth Table?

The XNOR gate has some interesting characteristics and lesser-known facts that make it a surprisingly versatile component in digital electronics. Although it isn’t always included as a basic gate in all IC families, it remains vital in many logic designs.

Here are some useful and fun insights:

  • The XNOR gate is also known as the equivalence gate because it outputs HIGH when inputs match.
  • In hardware description languages like VHDL and Verilog, XNOR can be written as XNOR or ^~ depending on syntax.
  • Some older logic IC families do not include a dedicated XNOR gate, requiring designers to construct it using XOR and NOT gates.
  • XNOR gates are essential in digital comparators and are widely used in arithmetic circuits inside CPUs.
  • They play a key role in bitwise operations where equality must be checked across multiple bits.
  • XNOR logic forms part of certain cryptographic and hashing circuits due to its predictable equivalence behavior.
  • Because XNOR determines equality, it is foundational for building simple pattern-matching circuits in embedded systems.

These insights highlight the gate’s importance in both theoretical and practical applications.


Frequently Asked Questions About the XNOR Gate Truth Table

The following frequently asked questions provide deeper clarification for students, hobbyists, and engineers learning how XNOR logic works.

What is the function of an XNOR gate?

An XNOR gate produces a HIGH output when all inputs are equal, whether they are all 0 or all 1. This equality-checking nature makes it extremely valuable in digital systems that need to detect matching conditions. In two-input circuits, the gate simply checks whether the two signals are the same. In larger systems, it can detect parity or help synchronize control signals. Because of this, XNOR gates often appear in digital comparators, address-matching circuits, and communication hardware.

What is the Boolean expression for a 2-input XNOR gate?

The Boolean expression is A·B + A′·B′, which means the output is HIGH when both inputs are the same. This expression states that the output becomes HIGH when both inputs are simultaneously 1 or simultaneously 0. The equation is useful when simplifying digital logic circuits or when writing HDL source code. It also helps verify that two signals match within a given logic system. By expanding or factoring this expression, engineers can create alternative implementations using AND, OR, and NOT gates.

How does the XNOR truth table differ from XOR?

The difference is straightforward: the XOR gate outputs HIGH when inputs differ, while the XNOR gate outputs HIGH when inputs match. In other words, XNOR is the logical complement of XOR. This relationship is useful because you can convert one into the other simply by adding a NOT gate. Understanding the distinction helps when designing parity circuits, digital comparators, and arithmetic units where matching or mismatching values produce different results.

What is the output of a 3-input XNOR gate?

A 3-input XNOR gate outputs HIGH when the number of HIGH inputs is even, either 0 or 2. If the total number of 1s is 1 or 3, the output becomes LOW. This behavior makes the gate suitable for parity detection, where determining whether the number of HIGH values is even is crucial. Engineers often use 3-input and larger XNOR gates in multi-bit comparison logic, communication systems, and binary pattern-recognition circuits.

Can you create an XNOR gate from other basic gates?

Yes, an XNOR gate can be built using a combination of other logic gates. A common method is to use an XOR gate followed by a NOT gate, effectively inverting the XOR output. You can also construct an XNOR gate using AND, OR, and NOT gates by implementing the full Boolean expression A·B + A′·B′. This flexibility is important when working with ICs that do not include a dedicated XNOR gate or when optimizing logic circuits for specific design constraints.

Is XNOR a universal gate?

No, the XNOR gate is not considered a universal gate. Universal gates, such as NAND and NOR, can be used to build any other type of logic gate, including AND, OR, XOR, and XNOR. While XNOR is extremely useful in equivalence and parity logic, it does not have the universal properties required to replicate all other gate functions on its own. However, it still appears in many digital systems due to its specialized behavior.

Where is the XNOR gate used in real life?

XNOR gates appear in many digital systems that require equality checking, pattern comparison, or bit-matching operations. They are essential components of digital comparators, memory address decoders, and error-checking circuits. In communication systems, XNOR gates help validate transmitted data by checking parity or confirming signal patterns. They are also used in processor architectures for bitwise operations, security applications where matching patterns must be confirmed, and even embedded controllers that synchronize multiple sensor inputs.


Conclusion

The XNOR gate truth table is a key concept in digital electronics, especially when dealing with equality logic. Whether you’re analyzing a 2-input XNOR gate truth table or a more complex 3-input XNOR gate truth table, understanding how this gate behaves is essential.

By mastering the XNOR table, you can design reliable logic circuits for a wide range of applications.

See the related XOR Truth Table article.