XOR gate circuit diagram using only NAND or NOR gate

XOR gate or Exclusive OR gate is a widely used logical gate in digital electronics. It is one of the logic gates in Computer which is available in IC form. We have discussed basic logic gates like OR gate, AND gate and NOT gate earlier in other articles. XOR gate can be constructed by using only basic logical gates, NAND gates and NOR gates separately. In this article, we are going to discuss the XOR logic gate, its Boolean expression and Truth table. Then I will explain the XOR gate circuit diagram using only NAND gate or NOR gate.

Contents in this article:

  1. What is XOR gate?
  2. Boolean expression of XOR gate
  3. Circuit diagram of XOR gate
  4. Truth Table of XOR gate
  5. XOR gate using NAND gate
  6. XOR gate using NOR gate
  7. Application of XOR gate

What is XOR gate?

XOR gate is also known as the Exclusive OR gate or Ex-OR gate. It gives the output 1 (High) if odd number of inputs are high. This can be understand in the Truth Table. It can have infinite number of inputs and only one output. In most of the cases two-input or three-input XOR gates are used.

XOR gate Boolean expression

We consider a two-input XOR gate with inputs A and B. If Y be the output of the gate then Boolean expression relating the inputs and the output is,

Y=A\overline{B}+\overline{A}B

or, Y=A\oplus B

This is the XOR gate formula. For the three input XOR logic gate, the XOR gate Boolean expression is Y=A\oplus B\oplus C, where A, B and C are the inputs.

Circuit diagram of XOR logic gate using basic logic gates

One can draw the circuit diagram for a XOR gate in many ways by using the different combinations of NAND, NOR, NOT, AND, OR gates. Also, XOR logic circuit can be designed by using only NAND gates or only NOR gates which are discussed later. Here we have designed XOR logic circuit by using basic logic gates i.e. by using AND, OR and NOT gates. Figure-1 shows the XOR gate schematic diagram and figure-2 shows the symbol of XOR gate.

Circuit diagram of XOR gate using basic logic gates
Figure-1: Circuit diagram of XOR gate using basic logic gates
XOR gate circuit symbol
Figure-2: XOR gate circuit symbol

Truth Table of XOR gate

Table-1 and Table -2 are the Truth tables for XOR gate with two inputs and three inputs respectively.

Input (A)Input (B)Output, \small Y=A\overline{B}+\overline{A}B
000
011
101
110
Table-1 : Truth Table for Two Input XOR gate
Input (A)Input (B)Input (C)Output, \small Y=A\oplus B\oplus C
0000
0011
0101
0110
1001
1010
1100
1111
Table-2: Truth Table for Three input XOR gate

XOR gate using NAND gate

One can construct an XOR gate by using minimum four NAND gates. However, It is also possible to design an XOR gate using more than four NAND gates. Here, we will draw the circuit diagram of two input XOR gate by using four NAND gates.

Circuit diagram of XOR gate using only NAND gates
Circuit diagram of XOR gate using only NAND gates

XOR gate using NOR gate

To design the circuit diagram of an XOR gate using only NOR gates, minimum five NOR gates are required. Also, one can design the same with more than five NOR gates. Here is the schematic diagram of XOR gate using five NOR gates.

Circuit diagram of XOR gate using only NOR gates
Circuit diagram of XOR gate using only NOR gates

Application of XOR gate

  • XOR gate has wide uses in arithmetic section of the computer.
  • In the Truth Table of two input XOR gate one can see that the circuit gives the output as high (1) when inputs are unequal (when one is 0 and other is 1). Thus, a two input XOR gate acts as an inequality detector.

This is all from this article on XOR gate diagram and truth table. If you have any doubt on this topic you can ask me in the comment section.

Announcement: If you are looking for someone to help with your physics assignments, please delegate your Do my physics homework for me to experts from “MyAssignmentLab“.

Thank you!

Related Posts:

  1. XNOR gate using NAND gate, NOR gate
  2. Basic logic gates using NAND gates only
  3. Basic logic gates with Truth Table and diagram – OR, AND, NOT gate
  4. NAND gate
  5. NOR gate
  6. 7 Types of Logic Gates