XNOR Gate Truth Table

In digital logic, a truth table lists all possible combinations of binary input values (0 and 1) and shows the output produced by the logic gate. The XNOR Logic Gate produces an output of 1 (HIGH) when its two inputs are the same. The output is 0 (LOW) when the inputs are different.

For two inputs, the XNOR Gate has four possible input combinations: 00, 01, 10, and 11. The following diagram shows the XNOR Boolean Expression, XNOR Gate Symbol, and XNOR Gate Truth Table.

XNOR Gate Truth Table

XNOR Gate Truth Table

Truth tables represent all possible input combinations and their corresponding outputs for a logic gate. XNOR Gate truth tables for various numbers of inputs are explained below

The total possible input combinations in a truth table are calculated using 2ⁿ, where n is the number of inputs.

For example:

  • For 2 inputs, combinations will be 22 = 4
  • For 3 inputs, combinations will be 23 = 8
  • For 4 inputs, combinations will be 24 = 16
  • For 5 inputs, combinations will be 25 = 32
  • For 6 inputs, combinations will be 26 = 64
  • For 7 inputs, combinations will be 27 = 128
  • For 8 inputs, combinations will be 28 = 256
  • For 9 inputs, combinations will be 28 = 504
  • For 10 inputs, combinations will be 28 = 1024

and so on…

Let’s explain various truth tables of XNOR Logic gate for different numbers of inputs

XNOR Gate Truth Table – 2 Inputs

For 2-input XNOR Gate, there are 22=4 possible input combinations, explained below.

  • Input A Column: First 2 bits = 0, next 2 bits = 1
  • Input B Column: Alternates 0 and 1

The truth table of 2 inputs XNOR Gate with its output is given below

XNOR Gate Truth Table - 2 Inputs

In the above XNOR gate truth table of 2 inputs:

  • For A = 0 and B = 0, the output (X) will be 1 because both inputs are inactive.
  • For A = 0 and B = 1, the output (X) will be 0 because only the B input is active.
  • For A = 1 and B = 0, the output (X) will be 0 because only the A input is active.
  • For A = 1 and B = 1, the output (X) will be 1 because both inputs are active.
A simple rule for an XNOR gate when more than 2 inputs are given:

Output = 1 when an even number of inputs are 1.
Output = 0 when an odd number of inputs are 1.

For example, with 3 inputs (A, B, and C):

  • 0 or 2 inputs are 1 → Output = 1
  • 1 or 3 inputs are 1 → Output = 0

XNOR Gate Truth Table – 3 Inputs

For 3-input XNOR Gate, there are 23=8 possible input combinations, explained below.

  • Input A Column: First 4 bits = 0, next 4 bits = 1
  • Input B Column: First 2 bits = 0, next 2 = 1, next 2 = 0, next 2 = 1
  • Input C Column: Alternates 0 and 1

The truth table of 3 inputs XNOR Gate with their output is given below

XNOR Gate Truth Table - 3 Inputs

In the above XNOR gate truth table of 3 inputs:

  • For A = 0, B = 0, and C = 0, the output (X) will be 1 because there are zero 1s, and zero is an even number.
  • For A = 0, B = 0, and C = 1, the output (X) will be 0 because there is one 1, and one is an odd number.
  • For A = 0, B = 1, and C = 0, the output (X) will be 0 because there is one 1, and one is an odd number.
  • For A = 0, B = 1, and C = 1, the output (X) will be 1 because there are two 1s, and two is an even number.
  • For A = 1, B = 0, and C = 0, the output (X) will be 0 because there is one 1, and one is an odd number.
  • For A = 1, B = 0, and C = 1, the output (X) will be 1 because there are two 1s, and two is an even number.
  • For A = 1, B = 1, and C = 0, the output (X) will be 1 because there are two 1s, and two is an even number.
  • For A = 1, B = 1, and C = 1, the output (X) will be 0 because there are three 1s, and three is an odd number.

XNOR Gate Truth Table – 4 Inputs

For 4-input XNOR Gate, there are 24=16 possible input combinations, explained below.

  • Input A Column: First 8 bits = 0, next 8 bits = 1
  • Input B Column: First 4 bits = 0, next 4 = 1, next 4 = 0, next 4 = 1
  • Input C Column: 2 zeros, 2 ones, repeated
  • Input D Column: Alternates 0 and 1

The truth table of 4 inputs XNOR Gate with their output is given below

XNOR Gate Truth Table - 4 Inputs

For a 4-input XNOR gate, the output is 1 when an even number of inputs are 1. The output is 0 when an odd number of inputs are 1.

  • For A = 0, B = 0, C = 0, and D = 0, the output (X) will be 1 because there are zero 1s, which is even.
  • For A = 0, B = 0, C = 0, and D = 1, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 0, C = 1, and D = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 0, C = 1, and D = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 1, C = 0, and D = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 1, C = 0, and D = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 1, C = 1, and D = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 1, C = 1, and D = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 0, C = 0, and D = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 1, B = 0, C = 0, and D = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 0, C = 1, and D = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 0, C = 1, and D = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 1, C = 0, and D = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 1, C = 0, and D = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 1, C = 1, and D = 0, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 1, C = 1, and D = 1, the output (X) will be 1 because there are four 1s, which is even.

XNOR Gate Truth Table – 5 Inputs

For 5-input XNOR Gate, there are 25=32 possible input combinations, explained below.

  • Input A Column: First 16 bits = 0, next 16 bits = 1
  • Input B Column: First 8 bits = 0, next 8 = 1, next 8 = 0, next 8 = 1
  • Input C Column: 4 zeros, 4 ones, repeated
  • Input D Column: 2 zeros, 2 ones, repeated
  • Input E Column: Alternates 0 and 1

The truth table of 5 inputs XNOR Gate with their output is given below

XNOR Gate Truth Table - 5 Inputs

For a 5-input XNOR gate, the output is 1 when an even number of inputs are 1 and 0 when an odd number of inputs are 1. The truth table of 5-input XNOR Gate with its output is given below.

  • For A = 0, B = 0, C = 0, D = 0, and E = 0, the output (X) will be 1 because there are zero 1s, which is even.
  • For A = 0, B = 0, C = 0, D = 0, and E = 1, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 0, C = 0, D = 1, and E = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 0, C = 0, D = 1, and E = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 0, C = 1, D = 0, and E = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 0, C = 1, D = 0, and E = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 0, C = 1, D = 1, and E = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 0, C = 1, D = 1, and E = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 0, B = 1, C = 0, D = 0, and E = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 0, B = 1, C = 0, D = 0, and E = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 1, C = 0, D = 1, and E = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 1, C = 0, D = 1, and E = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 0, B = 1, C = 1, D = 0, and E = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 0, B = 1, C = 1, D = 0, and E = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 0, B = 1, C = 1, D = 1, and E = 0, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 0, B = 1, C = 1, D = 1, and E = 1, the output (X) will be 1 because there are four 1s, which is even.
  • For A = 1, B = 0, C = 0, D = 0, and E = 0, the output (X) will be 0 because there is one 1, which is odd.
  • For A = 1, B = 0, C = 0, D = 0, and E = 1, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 0, C = 0, D = 1, and E = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 0, C = 0, D = 1, and E = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 0, C = 1, D = 0, and E = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 0, C = 1, D = 0, and E = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 0, C = 1, D = 1, and E = 0, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 0, C = 1, D = 1, and E = 1, the output (X) will be 1 because there are four 1s, which is even.
  • For A = 1, B = 1, C = 0, D = 0, and E = 0, the output (X) will be 1 because there are two 1s, which is even.
  • For A = 1, B = 1, C = 0, D = 0, and E = 1, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 1, C = 0, D = 1, and E = 0, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 1, C = 0, D = 1, and E = 1, the output (X) will be 1 because there are four 1s, which is even.
  • For A = 1, B = 1, C = 1, D = 0, and E = 0, the output (X) will be 0 because there are three 1s, which is odd.
  • For A = 1, B = 1, C = 1, D = 0, and E = 1, the output (X) will be 1 because there are four 1s, which is even.
  • For A = 1, B = 1, C = 1, D = 1, and E = 0, the output (X) will be 1 because there are four 1s, which is even.
  • For A = 1, B = 1, C = 1, D = 1, and E = 1, the output (X) will be 0 because there are five 1s, which is odd.