•  
agra,ahmedabad,ajmer,akola,aligarh,ambala,amravati,amritsar,aurangabad,ayodhya,bangalore,bareilly,bathinda,bhagalpur,bhilai,bhiwani,bhopal,bhubaneswar,bikaner,bilaspur,bokaro,chandigarh,chennai,coimbatore,cuttack,dehradun,delhi ncr,dhanbad,dibrugarh,durgapur,faridabad,ferozpur,gandhinagar,gaya,ghaziabad,goa,gorakhpur,greater noida,gurugram,guwahati,gwalior,haldwani,haridwar,hisar,hyderabad,indore,jabalpur,jaipur,jalandhar,jammu,jamshedpur,jhansi,jodhpur,jorhat,kaithal,kanpur,karimnagar,karnal,kashipur,khammam,kharagpur,kochi,kolhapur,kolkata,kota,kottayam,kozhikode,kurnool,kurukshetra,latur,lucknow,ludhiana,madurai,mangaluru,mathura,meerut,moradabad,mumbai,muzaffarpur,mysore,nagpur,nanded,narnaul,nashik,nellore,noida,palwal,panchkula,panipat,pathankot,patiala,patna,prayagraj,puducherry,pune,raipur,rajahmundry,ranchi,rewa,rewari,rohtak,rudrapur,saharanpur,salem,secunderabad,silchar,siliguri,sirsa,solapur,sri-ganganagar,srinagar,surat,thrissur,tinsukia,tiruchirapalli,tirupati,trivandrum,udaipur,udhampur,ujjain,vadodara,vapi,varanasi,vellore,vijayawada,visakhapatnam,warangal,yamuna-nagar

Exclusive-OR Gate or XOR Gate

Exclusive-OR Gate or XOR Gate

Imagine you want to compare two binary digits and find out if they are different from each other or not. The question is: how are you going to do that? The answer is an exclusive OR gate. The exclusive OR gate is an important logic gate that is used in various arithmetic, parity-checking, and encryption operations.

Table of Contents:

What is an Exclusive-OR gate?

The exclusive-OR gate, often called the XOR or ex-OR gate, is a logic gate that is made from the basic logic gates of AND, OR, and NOT. The exclusive-OR gate plays a very vital role in digital electronics because it can function as an adder, error detector, and even correction circuit.

The XOR gate produces a high output, i.e., logic "1," when the inputs to the gate are different. It produces a low output, i.e., logic "0," when the inputs to the gate are the same.

When the inputs to the XOR gate are either ‘1 0’ or ‘0 1’, then the output produced by the XOR gate will be high, i.e., ‘1’.

When the inputs to the XOR gate are either ‘0 0’ or ‘1 1’, then the output produced by the XOR gate will be low, i.e., ‘0’.

Symbol of the Exclusive-OR gate

The symbol of the XOR gate is shown below:

The symbol of the XOR gate

Image: The symbol of the XOR gate

Truth Table of the Exclusive-OR gate

A

B

Q

0

0

0

0

1

1

1

0

1

1

1

0

Boolean Expression of the Exclusive-OR gate

From the above table, we can write the expression of Q as

image

The XOR output is represented as

image

Thus,

image

Circuit Diagram of the Exclusive-OR gate

The Exclusive-OR gate is realised by connecting the basic gates of AND, OR and NOT together. The circuit diagram of realising the XOR gate using AND, OR and NOT gates is shown below:

XOR gate using AND, OR and NOT gates.

Image: XOR gate using AND, OR and NOT gates.

This circuit is often known as the equivalent circuit of the XOR gate.

3-input Exclusive-OR gate

3-input Exclusive-OR gate

Image: 3-input Exclusive-OR gate

While the logic gates AND, OR, NAND and NOR come with 3-input pin ICs, the same cannot be said about the Ex-OR gate. The 3-input XOR gate is only used in theoretical representation for easy understanding. In practicality, a 3-input XOR gate can be created using two 2-input XOR gates in cascade as shown below:

image

Image:: A 3-input XOR gate created using two 2-input XOR gates

The truth table of a 3-input XOR gate is given below:

Truth Table of the 3-input XOR gate

A

B

C

Q

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

Boolean expression of the 3-input XOR gate

From the above truth table, we can derive the expression of Q as

image

We represent the 3-input XOR gate Boolean expression in short as

image

Applications of the Exclusive-OR gate

  • The XOR gate can be used as a Half-Adder circuit.
  • The Ex-OR gate can be used to encrypt binary data with a secret key.
  • The logic gate can be used for parity checking and to find errors in data transmission.

Solved Problems

Example 1: Implement the XOR gate using only NAND gates.

Solution:

XOR gate using AND, OR and NOT gates.

Example 2: Implement the Boolean expression given below using only XOR gatesimage

image

Practice Problems

1. Realise the XOR gate using only NOR gates.

2. Realise the below given Boolean expression using XOR gates only:

image

Frequently Asked Questions

Q1. What is the difference between an XOR gate and an OR gate?
Answer:
An XOR gate produces a high output when the number of high inputs is odd, while an OR gate produces a high output if any of the inputs is high.

Q2. Can an Exclusive-OR gate have more than two inputs?
Answer: 
Theoretically, yes, it can have more than two inputs. But practically, the XOR gate does not have 3 inputs.

Q3. How is an Exclusive OR gate used in cryptography?
Answer: 
XOR gates are used in encryption algorithms to perform bitwise operations on data and encryption keys. They contribute to the generation and manipulation of ciphertext.

NEET Related Links

NEET Exam 

NEET  Exam Dates

NEET  Exam pattern

NEET  Syllabus

NEET  Eligibility Criteria

NEET  Application

NEET UG Counselling

NEET FAQ

NEET UG Result

NEET  Cut Off

JEE MAIN Related Links

JEE Main 

JEE Main Rank Predictor 

JEE Main College Predictor 

JEE Main  Exam Dates

JEE Main  Exam pattern

JEE Main  Application

JEE Main  Eligibility Criteria

JEE Main  Syllabus

JEE Main  Physics Syllabus

JEE Main  Maths Syllabus

JEE Main  Chemistry Syllabus

JEE Main  Admit Card

JEE Main  Counselling

JEE Main marks vs rank vs percentile

JEE Advanced Related Links

JEE Advanced  Exam Dates

JEE Advanced  Application

JEE Advanced  Eligibility Criteria

JEE Advanced  Syllabus

JEE Advanced  Maths Syllabus

JEE Advanced  Physics Syllabus

JEE Advanced  Chemistry Syllabus

JEE Advanced Exam Result

JEE Advanced Exam Dates

JEE Advanced Registration Dates

CUET Related Links

CUET  Eligibility Criteria

CUET  Admit Card

CUET  Exam Pattern

CUET  FAQs

CUET  Counselling

CUET  Syllabus

CUET  Result

CUET  Answer Key

CUET  Preparation

CUET CUTOFF

CUET  Application Form

Important Topics

Talk to Our Expert Request Call Back
Resend OTP Timer =
By submitting up, I agree to receive all the Whatsapp communication on my registered number and Aakash terms and conditions and privacy policy