Open In App

Implementation of XOR Gate from AND, OR and NOT Gate

Last Updated : 20 Mar, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will discuss the implementation of XOR gate using AND, OR and NOT Gate. We will discuss about the AND, OR, XOR and NOT gates, and with it, we will discuss about their operations, logic diagrams and truth table. After understanding the gates and their operation we will use those gates to design a combinational circuit to replicate the XOR gate.

We will look into the steps required to design the logical circuit using the three types of gates by using the logical expression of the XOR gate. We will further verify the circuit using the truth table.

What is XOR Gate?

Exclusive OR or XOR is a type of binary operator in logical operation. This gate takes the input of two variables and gives a single output. It gives the output as high when one input is high and the other one is low. The output will be low when both the inputs are the same (high or low). This gate is like an inequality function as the output is High or True only when both the inputs are different. There also exists multiple input XOR gate, in this case, the output is high only when the odd number of inputs is 1 and low when no input or even number of inputs is 1.


What-is-XOR-gate

XOR Gate


The expression for the XOR gate is given below :

C=A \oplus B=A'B+AB'

Where A and B is the Input and C is the Output

What is AND Gate?

This gate is a binary logical operation. It is identical to multiplication operation. When both the inputs of the gate are high then only the output will be high in other cases when at least one low input is there the output will be always low. It performs logical conjunction operation. The logical expression for AND gate is A\land B= A.B. There also exists multiple input AND gates. Multiplexers use AND gates for selecting the signal out of many inputs based on the control signal. AND gates play an important role while implementation of combinational logical circuits.


What-is-AND-Gate

AND Gate


The expression for the AND gate is given below :

C=A.B

Where A and B are the Inputs and C is the Output

What is OR Gate?

It is another type of logic gate which is identical to addition operation. When any of the inputs is high the output will be high. The output will be low only when all the inputs are low. This gate performs logical disjunction. The operation of OR gate similar to addition of 1’s and 0’s.


What-is-OR-Gate

OR Gate

The logical expression of OR gate is given below :

A \lor B = A+B.

What is NOT Gate?

This gate is also known as logical negation operation. This gate converts high input to low and vice versa. It is a single input gate. This gate is also not as inverter as it inverts the input. This is a single input gate, and it always gives the complement of its input as an output. It is used in applications where inversion is required. The use of NOT gate in circuit design can create propagation delays.


What-is-NOT-Gate

NOT Gate


The logical expression of the NOT gate is given below :

Y = \overline{A}.

Implementation of XOR Gate from AND, OR and NOT Gate

As we know, the expression of XOR is A \oplus B= A.\bar B+\bar A.B so we implement this expression using three types of gates AND, OR and NOT which are explained above. The combination of three gates are used to achieve the expression of XOR.

The steps that are required to follow to implement XOR gate are given below,

  • First we need to break the expression into different parts which will help us to analyze the number of gates required.
  • After breaking the expression in the above step we can see that we need 2 NOT, 2 AND and a NOT gate.
  • There are two two inputs to the OR gate which are outputs of AND gate.
  • Input A is given of one AND gate and to Another AND gate through a NOT gate.
  • Now, input B is given to the AND gate which has negation of input A and the AND gate which has direct input A gets input B through a NOT Gate.
  • The output of both the AND gate is then given as input to the OR gate.
  • The final output of the OR gate is the expression of XOR gate.


What-is-Logic-circuit

Implementation of XOR Gate from AND, OR and NOT Gate

From the above truth table we can see that final output is identical to the XOR gate and hence we can verify that the combinational logic circuit is equivalent to the XOR gate.

Conclusion

In this article, we have implemented a combination circuit which represents the XOR operation. To implement the XOR operation using different gates, the logical expression of the XOR gate was used. The expression helped to decide the three gates that were to be used namely AND, OR and NOT gate. The combinational circuit was designed using the three types of gates and was then verified using the truth table.

Implementation of XOR Gate from AND, OR and NOT Gate – FAQs

What are Universal logic gates ?

These gates can be used to implement any type of logic gate. There are two universal logic gates NAND and NOR.

What are logic Gates ?

Logic gates are the building blocks of digital circuits they are used for implementing Boolean algebra. They are used for decision making and computation in various devices.

What is the purpose of XOR gate?

The XOR gate (exclusive OR gate) outputs true (1) only when its two inputs differ. It is commonly used in arithmetic and cryptographic operations.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads