The XNOR gate is a logic gate that performs an exclusive NOR operation. 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(either both true or both false). For different inputs, the output of the XNOR gate is logic 0. Hence, the XNOR gate is used to implement similarity checker circuits. It is also known as the material biconditional. This logic gate is denoted by this sign "⊙".
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 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 SymbolTruth 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.
Truth Table of XNOR GateOperation of XNOR Gate
The following is the Boolean expression of the XNOR gate,
Y = A ⊙ B
Here, A and B are the input variables and Y is the output variable.
This expression can also be written as follows,
Y = AB + A'B'
We can also express the operation of an XNOR gate using XOR gate logic as follows:
Y = (A ⊕ B)'
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
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 TransistorThe 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 GateThe 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 fourth 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
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.
- Bi-stable 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 gate and XOR, XNOR gates are not well-suited for arithmetic operations.
Solved Example based on XNOR Gate
Example: 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 by '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.
Similar Reads
XOR Gate The XOR or Exclusive OR Gate is a special type of logic gate used in digital electronics to perform the exclusive OR operation. This gate takes two inputs and produces an output depending on the combination of the two inputs applied. This logic gate produces a high or logic 1 output when both of the
9 min read
OR Gate OR GATE is most widely used digital logic circuit and is known as a primitive digital electronics building block in digital logic. The output state of OR gate will be high i.e.,(1) if any of the input state is high or 1, else output state will be low i.e., 0. The Boolean Expression for the OR gate i
7 min read
GATE CSE preparation story GATE is the most prestigious post graduate exam for engineering students. Gate score is also taken by many PSU's (Public sector Undertakings) for recruitment and job offerings. PSU'S are government owned corporations offering jobs directly to top scorers of GATE exam. A good score in GATE can direct
3 min read
How I Prepared for GATE CSE ? GATE is an important and in-demand entrance exam for engineering graduates in our country. The most important factor for the GATE exam preparation is to be focused and follow the path that you plan. Every section is equally important and should be given equal respect. In this article, we are going t
6 min read
How I Prepared for GATE CSE ? GATE is an important and in-demand entrance exam for engineering graduates in our country. The most important factor for the GATE exam preparation is to be focused and follow the path that you plan. Every section is equally important and should be given equal respect. In this article, we are going t
6 min read
Introduction of Logic Gates In Boolean Algebra, there are three basic operations, +,\:.\:,\:^\prime which are analogous to disjunction, conjunction, and negation in propositional logic . Each of these operations has a corresponding logic gate. Apart from these, there are a few other logic gates as well. It was invented by Geor
9 min read