JEE Exam » JEE Study Material » Physics » Physics Exclusive – OR gate (XOR Gate)

Physics Exclusive – OR gate (XOR Gate)

This article is about XOR gates, its uses and it's truth table rules. It will help you to understand these basic gate circuits and how they can help with your day-to-day routine.

Exclusive OR gate depends on the binary system. The binary system consists of input gates 0, 1. This binary system consists of logic gates which are used as a basic building block of a circuit to make a large number of electronic circuits. In an exclusive OR gate, the only time the output is positive is when the inputs are not the same, that is when the output is logical 1. The truth table for inputs in an exclusive OR gate is –

A

B

Y

0

0

0

0

1

1

1

0

1

1

1

0

Here A and B are the input gates, and Y is the resultant. For an exclusive OR gate, the input values should be different, not equal.

XOR Gate

An XOR Gate that is the Exclusive OR gate gives a higher output when one of the inputs is different. As observed in the truth table above, when both the inputs are equal, the output will be logical 0. This is the reason the XOR gate is also called an anti-coincidence gate or inequality detector. Its output is 1 when one of its inputs is exclusively 1. The output from the XOR gate will be high only if any one of the inputs is high and not when both the inputs are high. 

The operation of the exclusive OR gate (XOR gate) is represented by ‘A ⊕ B’, a plus sign surrounded by a circle. The symbol is also known as circled plus. As per the truth table, a boolean expression – as given below – can be derived.

A ⊕ B = AB+AB

Symbolic Representation

XOR gate with three inputs

A

B

C

Y

0

0

0

0

0

0

1

1

0

1

0

1

0

1

1

0

1

0

0

1

1

0

1

0

1

1

0

0

1

1

1

1

Uses of XOR Gates

  • Error detection circuits – In error detection circuits, parity bits are used. For even parity, XOR gates are used in digital logic.

  • Arithmetic logic circuits – In arithmetic circuits, XOR is used to implement binary addition in computers. It is a part of the half-adder electronic circuit in the computers.

  • Computational logic comparators – Here, the XOR gate is used very similarly to how it is used in arithmetic logic circuits.

  • Simple digital addition circuits – Such circuits can be found in our everyday calculators.

  • Buffer circuits – By simply connecting one of the inputs to logic ‘0’, an XOR gate circuit can work as an inverter as well as a buffer circuit.

  • Multi-bit programmable inverter – Here, the XOR gate circuit has many inputs, but its function remains the same.

  • Expansion component – Here, the XOR has a similar application in binary addition as in arithmetic logic circuits.

  • Embedded system applications – Here, the XOR gate circuits are a part of huge computer systems.

  • Binary to Grey and from Grey to binary Conversion – With the similar function of the XOR gate circuit, it can be used in both ways, especially in shaft register encoders and analog to digital conversions.

  • Microprocessors – The XOR gate circuit in microprocessors performs bit-wise of the two operands.

  • Microcontrollers – The disjunction between logic operations is carried by XOR gate circuits in microcontrollers.

  • Adders and half-adders – In binary addition

  • Pseudo-random number generator – XOR gate circuit in a pseudo-random number generator is connected to a switch that has a low value initially; by default, this randomly initiates a number.

  • Generating ciphertext – It is an encryption algorithm where an XOR gate is used for producing such encrypted data, which is difficult to crack by the brute-force method. Performing an XOR of a digitised message with a binary key produces encrypted ciphertext. 

Difference between XOR and XNOR

XOR gate

XNOR gate

It is known as odd detector

It is known as even detector

It starts operating when one of the inputs are different

It starts operating when both of the inputs are same

It is also known as the exclusive OR gate

It is also known as inclusive OR gate

In the truth table, XOR gives a logical value of 1 when both the inputs are different.

In the truth table, XNOR gives a logical value of 1 when both the inputs are the same.

In the symbolic representation of the XOR gate, there is no circle in front of the circuit symbol.

In the symbolic representation of the XNOR gate, there is a circle in front of the circuit symbol to indicate inversion or XOR gate.

Conclusion

XOR has a wide range of applications. It is a vital part of our day-to-day life. Its major contribution to computer circuits and arithmetic calculations has increased its use in a wide range of electric circuits. It is counted as one of the special gates along with the XNOR gate. The binary values 1 and 0 are also known as true and false values. The exclusive OR gate (XOR gate) is not counted among the universal gates such as OR, AND, NAND, etc. The basic logic behind the XOR gate is that when the inputs are the same, the gate will not turn on, but when one of the inputs is different, the gate will start operating.

 
faq

Frequently Asked Questions

Get answers to the most common queries related to the JEE Examination Preparation.

Can the XOR gate have 3 inputs?

Ans : Yes, we can have 3 inputs for the XOR gate. It ...Read full

Why is the XOR gate a special gate?

Ans : Due to the function of the XOR gate of detecting an odd number of inputs, it is known as an o...Read full

Where are logic gates used?

Ans : In real life, logic gates like NAND are used in...Read full

Why do we need XOR gates?

Ans : The XOR gate has an important application in adders and half-adders as they perform arithmeti...Read full

Why is the XOR gate called an inverter?

Ans : The XOR gate has two different values/ inputs. If one of the inputs has logical value 1 then ...Read full