Open In App

XNOR Gate

Last Updated : 24 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

In digital electronics, the XNOR gate is a type of logic gate used to perform an exclusive NOR gate. It is a special type of logic gate used in digital circuits. An XNOR gate, also known as an equivalence gate or an EX-NOR gate, is a digital logic gate that outputs true (1) when an even number of true inputs are present. It produces a true output if both of its inputs are the same (either both true or both false). It is also known as the material biconditional. This logic gate is denoted by this sign “⊙”.

What is an XNOR Gate?

An XNOR gate is a specially designed logic gate having only two inputs and one output. The output of the XNOR gate is logic 1 when both the inputs are logic 1 or logic 0. In other words, the output of the XNOR gate is logic 1 when both the inputs are the same. For dissimilar inputs, the output of the XNOR gate is logic 0. Hence, the XNOR gate is used to implement similarity checker circuits.

We can design an XNOR gate by combining two logic gates namely, the XOR gate and the NOT gate. Hence, we can state that

XNOR Gate = XOR Gate + NOT Gate

I. e., an XNOR gate is nothing but an XOR gate followed by a NOT gate.

The most important point to note about the XNOR gate is that it can have only two inputs. We cannot design an XNOR gate having three or more inputs. If we need an XNOR gate with three or more inputs, then we combine multiple two-input XNOR gates together to implement a circuit that can take three or more inputs and perform XNOR operation on them.

XNOR Gate Logic Symbol

The logic symbol of an XNOR gate is depicted in the following figure. It has two inputs represented by A and B, and one output line represented by Y.

XNOR Gate with Truth Table

XNOR Gate with Truth Table

Truth Table of XNOR Gate

The truth table is a logical table that shows the relationship between inputs and output of an XNOR gate and provides information about the operation of the gate. In XNOR gate the Output is high (1) when both inputs are same(either both 0 or both 1), and low (0) when the inputs are different.

Operation of XNOR Gate

The following is the boolean expression of the XNOR gate,

[Tex]Y=A \odot B [/Tex]

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

This expression can also be written as follows,

[Tex]Y=AB+ \overline{A} \overline{B} [/Tex]

We can also express the operation of an XNOR gate using XOR gate logic as follows:

[Tex]Y = \overline{A \oplus B} [/Tex]


Equivalent Gates

Now we will see how we can form XNOR gate using Different Logic gate and Transistors

XNOR Gate using Basic Logic Gates

The following figure shows the circuit diagram of an XNOR gate using basic logic gates i.e., AND, OR, and NOT gates.

Logic Diagram of 2-Input  XNOR Gate

Logic Diagram of 2-Input XNOR Gate


This circuit operates as an XNOR gate and produces a logic 1 or logic 0 output depending on the inputs applied to it.

Implementation of XNOR Gate using Transistor

We can implement the XNOR gate using bipolar junction transistors. The schematic circuit diagram of the XNOR gate using transistors is shown in the following figure.

XNOR Gate Representation in Terms of Transistor

XNOR Gate Representation in Terms of Transistor

The circuit depicted above presents an efficient approach to constructing an XNOR gate using only five transistors. There are some other ways to create it using 10 transistors, which is not suggested. So here we will create an XNOR gate using 5 transistors.

The initial pair of transistors on the left serves the function of a NAND gate, while the middle transistor acts as a switch. The last two transistors fulfill a role similar to that of an OR gate. In the provided image, it is evident that both input signals are in the active state, as indicated by the connection of the two resistors on the far left to inputs A and B and the output LED as 0.

This configuration effectively directs the current away from the resistor nearest to the LED, preventing it from flowing toward the left ground. Instead, it guides the current along the path leading to the right ground. Consequently, the output is active, which accounts for the illumination of the LED. Conversely, when both inputs are inactive, the output remains inactive as the current cannot reach the left ground. If only one input is active, the current will travel from the far-right resistor to the middle ground, resulting in the LED remaining unlit.

Let us now discuss how to implement the XNOR gate using NAND Gate and NOR Gate ( Universal Logic Gates).

Implementation of XNOR Gate using NAND Gate

We can also implement the XNOR gate using NAND gates only. For this we require five two-input NAND gates. The circuit diagram of an XNOR gate using NAND gates only is shown in the following figure.

XNOR Gate Construction using NAND Gate

XNOR Gate Construction using NAND Gate

The following are important points about the XNOR gate using NAND gate:

  • To create an XNOR Gate from NAND Gate we will require total 5 NAND gate.
  • The first NAND Gate output will be : (A.B)’
  • Output of the second and third NAND Gate respectively: (A.(A.B)’)’ and (B.(A.B)’)’
  • Output of the fouth output is : ((A.(A.B)’)’ . B.(A.B)’)’

Now we can simplify this equation using De Morgan’s Law:

Y = ((A.(A.B)’)’ . B.(A.B)’)’ A.(A.B)’ + b.(A.B)’ A(A’ + B’) +B(A’ + B’) (A + B)(A’ + B’) Y=AB’ + A’B Y= A ⊕ B (This is equal to a XOR Gate output)

So to get the desired output of XNOR Gate, this output will be passed through a NAND Gate again, and then the output will be :

Y = ( A⨁B )’ = A⨀B

Implementation of XNOR Gate Using NOR Gate

We can also implement an XNOR gate using NOR gate. For this, we need five NOR gates that are to be connected together as shown in the following figure. This circuit will operate as an XNOR gate.


XNOR Gate Logic Circuit Using NOR Gate

XNOR Gate Logic Circuit Using NOR Gate


To create a XNOR Gate from an NOR gate it will require five NOR Gate. And we will use De Morgan’s Law again,

Lets consider the inputs are A and B. Output of the first and second NOR Gate will be :

(A+A)’ and (B+B)’

Output of the third and fourth NOR Gate Respectively :

(B+(A+A)’)’ and (A+(B+B)’)’

Then these two output goes to the last and fifth NOR Gate.

Y = ((B+(A+A)’)’ + (A+(B+B)’)’ )’ (B+A’)’ + (A+B’)’ B’.(A’)’ + A’.(B’)’ Y = B.A’+A.B’ = A⨀B


Applications of XNOR Gate

Given Below are some of the Applications of XNOR gate :

  • Comparators: They are used to compare binary values.
  • Binary Arithmetic: XNOR gates are used to detect equal values in binary addition and subtraction.
  • Parity Checking: XNOR gates are utilized to ensure even or odd parity in data.
  • Multiplexers (MUX): They assist in selecting input channels.
  • Latch and Flip-Flop Control: XNOR gates enable or disable storage elements.
  • Decoders: These gates activate specific outputs based on input codes.
  • Clock Synchronization: XNOR gates play a role in synchronizing clock signals.
  • Data Storage: They improve data storage efficiency when combined with SRAM cells.
  • Bistable Latching: XNOR gates help maintain stable output states.
  • Control Logic: They are pivotal in sequencing and decision-making.
  • Full Adders and ALUs: XNOR gates are integral in performing arithmetic operations in digital circuits.

Advantages of XNOR Gate

Given Below are some of the Advantages of XNOR gate

  • Simplicity: XNOR gates are known for their straightforward implementation.
  • Dedicated Functionality: They are purpose-built for equality testing.
  • Complementary Outputs: XNOR gates offer complementary output signals.
  • Ease of Integration: They simplify the design of circuits that involve comparisons.
  • Data Reliability: XNOR gates play a crucial role in memory storage, improving data integrity and reliability.

Disadvantages of XNOR Gate

Given Below are some of the Disadvantages of XNOR gate

  • Limited functionality: XNOR gates can only perform equality comparisons and lack versatility for more complex logic operations.
  • Complexity in circuit design: Constructing complex circuits exclusively with XNOR gates can be challenging and less efficient.
  • Input dependency: XNOR gates require an even number of inputs, limiting their flexibility in various applications.
  • Unsuitable for arithmetic operations: Unlike other gates like AND and XOR, XNOR gates are not well-suited for arithmetic operations.

Solved Example based on XNOR Gate

A person is making a lift, where the lift will start,

  • only when the current floor and destination floor is given by the user,
  • also if neither current floor and nor destination floor is given.

Otherwise it will not start.

Solution

According to the question let’s build a truth table.

Suppose, current floor number input denoted by ‘1’ and input not given denoted by ‘0’;

The same way, the destination floor number given denoted by ‘1’ , and not given denoted by ‘0’.

And starting of the lift is denoted by ‘1’ and not starting is denoted bt ‘0’.

Now, possible outcomes are :

Input(A)

Input (B)

Output (A⨀B)

0

0

1

0

1

0

1

0

0

1

1

1

So, according to the question, the lift will start only if both of current and destination floor number is given or neither the current nor destination floor number is given. Otherwise, it will not start. Here we can use an XNOR Gate, as XNOR gate functions are the same, it will print one, only when, both of the input is true, or neither is true.

So the first and the last combination are, when both of the inputs are true, means both of the floor numbers given or none given. In such a case, the lift will start.

The second and third combinations are for when either the current floor number is given and the destination floor number is not given or either the destination floor number is given and the current floor number is not given. In both of the cases, the lift will not start.

Conclusion

In this article we have learnt about the XNOR gate. An XNOR gate or equivalence gate or an EX-NOR gate, is a digital logic gate that outputs true (1) when an even number of true inputs are present. It produces a true output if both of its inputs are the same (either both true or both false). This article explains the truth table, symbolic representation, solved example, and applications which helps in better understanding of the article.

XNOR Gate – FAQs

What are the alternative names for an XNOR gate?

Alternative names for an XNOR gate include the equivalence gate or equality gate.

Can XNOR gates be used to create other logic gates?

Yes, XNOR gates can be used to create other logic gates. For example, by connecting the outputs of two XNOR gates to an OR gate, you can create a NOR gate. By connecting the outputs of two XNOR gates to an AND gate, you can create an AND gate.

What is the significance of XNOR gates in binary arithmetic?

XNOR gates have significance in binary arithmetic, particularly in functions like binary addition with carry. When adding two bits together, XNOR gates can be used to determine whether a carry should be generated in the addition process.

Can I cascade XNOR gates to create larger XNOR gates?

Yes, you can cascade XNOR gates to create larger XNOR gates with more inputs. This is a common practice in digital circuit design to handle additional input signals and perform more complex operations.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads