XNOR Gate in Digital Electronics



An XNOR gate is a type of derived logic gate which is a combination of an XOR gate and a NOT gate. Hence, it produces a "NOTed XOR" output.

In this chapter, we will explain the basic theory of XNOR logic gate, its working, circuit diagrams, and applications. So, let’s start with the basic definition of XNOR gate.

What is XNOR Gate?

The XNOR gate is a logic gate that has two inputs and one output.

The output of the XNOR gate is high, only when both of its inputs same, i.e., either both inputs are high or both inputs are low. If the inputs are dissimilar, i.e., one is high and the other low, the output is low or logic 0.

Since the XNOR gate produces a high output when both its inputs are similar, it is also known as an equality detector.

The XNOR gate is also known as Exclusive-NOR or Ex-NOR gate.

Actually, the XNOR gate is a combination of two logic gates namely, XOR gate and NOT gate. Therefore,

XNOR Gate = XOR Gate + NOT Gate

It is important remember that there is no such thing like an XNOR gate with three or more inputs. To obtain an XNOR gate with inputs more than two, we combine multiple two-input XNOR gates together.

Logic Symbol of XNOR Gate

The logic symbol for a two input XNOR gate is shown in the following figure.

Logic Symbol of XNOR Gate

The bubble on the right-end represents the NOT operation. The variables A and B represent the input lines while Y represents the output line.

Truth Table of XNOR Gate

The truth table of an XNOR gate provides information about the operation and relationship between inputs and output of it.

The truth table of a two-input XNOR gate is given below −

Input Output
A B Y
0 0 1
0 1 0
1 0 0
1 1 1

From this truth table, it can be observed that the XNOR gate produces a high or logic 1 output when both of its inputs are same i.e., 0 and 0 or 1 and 1. Otherwise, it gives a low or logic 0 output.

Boolean Expression of XNOR Gate

The Boolean expression is a logical function that describes the relationship between inputs and output of an XNOR gate mathematically.

The Boolean expression of a two-input XNOR gate is given below −

$$\mathrm{Y \: = \: A \: \odot \: B}$$

This can also be expressed as,

$$\mathrm{Y \: = \: AB \: + \: \bar{AB}}$$

Here, A and B are input variables while Y is the output variable.

Working of XNOR Gate

The operation of a two-input XNOR gate for different input combinations is explained below −

  • If A = 0 and B = 0, the output of the XNOR gate is Y = 1.
  • If A = 0 and B = 1, the output of the XNOR gate is Y = 0.
  • If A = 1 and B = 0, the output of the XNOR gate is Y = 0.
  • If A = 1 and B = 1, the output of the XNOR gate is Y = 1.

Hence, we can see that the output is high or logic 1 for similar inputs. It is low or logic 0 for dissimilar inputs.

XNOR Gate using Switches

We can realize the XNOR gate logic with the help of two switches, a battery, and a lamp.

Here is the electrical circuit representing the XNOR logic gate.

XNOR Gate using Switches

In this circuit, when both switches A and B are at same level i.e., at 0 and 0 or 1 and 1. There is a closed path for the current to flow through the lamp. This turns on the lamp and represents the high or logic 1 output.

If the switches are at different levels i.e., one is at level 0 and the other is at level 1. There is no complete path between the battery and lamp. Hence, the lamp will not glow and represent the low or logic 0 output.

Hence, the above shown switching circuit implements the XNOR logic operation.

XNOR Gate as an Inverter

The XNOR gate can operate as an inverter. If we connect one of the input lines of the XNOR gate at low or logic 0 signal and we apply the input signal to another input line. Then, the output of the XNOR gate will be the complement of the input applied.

The logic circuit of an XNOR gate working as an inverter is depicted in the following figure.

XNOR Gate as an Inverter

We can also explain this operation with the help of its Boolean expression as below.

$$\mathrm{Y \: = \: AB \: + \: \bar{AB}}$$

If B is set at logic 0, then

$$\mathrm{Y \: = \: A\cdot0 \: + \: \bar{A}\cdot1 \: = \: \bar{A}}$$

Hence, if one input XNOR gate is tied to logic 0, then the gate will work as an inverter.

XNOR Gate as a Buffer

The XNOR gate can also operate as a buffer. If we connect of one of the inputs of the XNOR gate to logic 1 and the input signal is applied to another input line. The output of the XNOR gate will be same as the input applied, i.e., the XNOR gate will work as a buffer.

The XNOR gate working as a buffer is shown in the following figure.

XNOR Gate as a Buffer

Logically, we can prove this operation through its Boolean expression as below.

$$\mathrm{Y \: = \: AB \: + \: \bar{AB}}$$

If B is set at logic 1, then

$$\mathrm{Y \: = \: A\cdot1 \: + \: \bar{A}\cdot0 \: = \: A}$$

Thus, an XNOR gate with one input set to logic 1 acts as a buffer.

Applications of XNOR Gate

The XNOR gate is widely used in numerous digital circuits and systems. Some of the key applications of XNOR gate are given below −

  • XNOR gate is used in digital communication systems to detect errors that occurred during data transmission.
  • XNOR gate acts as an equality detector. Thus, it is also used to compare binary data or signals.
  • XNOR gate is also used to design digital gaming systems and logic puzzles.

Conclusion

In conclusion, the XNOR gate or Exclusive NOR gate is a logic gate used in various digital electronic applications. It is a two-input logic gate.

The unique functionality of the XNOR gate of equality detection is widely used in digital signal comparison and data transmission error checking.

In this chapter, we explained the basic theory and working of the XNOR gate along with its key applications.

Advertisements