0% found this document useful (0 votes)
139 views

Exclusive-OR Gate Tutorial With Ex-OR Gate Truth Table

The document provides an in-depth tutorial on exclusive-OR (XOR) gates, including: - XOR gates output 1 only when the inputs are different, unlike inclusive-OR gates which output 1 when inputs are the same or different. - XOR gates are useful for arithmetic operations and comparisons, and are implemented using combinations of NAND gates. - Common XOR gate ICs include the 74LS86 and CD4030 quad two-input gates.

Uploaded by

Gowri Shankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

Exclusive-OR Gate Tutorial With Ex-OR Gate Truth Table

The document provides an in-depth tutorial on exclusive-OR (XOR) gates, including: - XOR gates output 1 only when the inputs are different, unlike inclusive-OR gates which output 1 when inputs are the same or different. - XOR gates are useful for arithmetic operations and comparisons, and are implemented using combinations of NAND gates. - Common XOR gate ICs include the 74LS86 and CD4030 quad two-input gates.

Uploaded by

Gowri Shankar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Register to download premium content!

Home / Logic Gates / Exclusive-OR Gate Tutorial

Exclusive-OR Gate Tutorial


The Exclusive-OR logic function is a very useful circuit that can be used in many different types of
computational circuits

In the previous tutorials, we saw that by using the three principal gates, the AND Gate, the OR Gate and the
NOT Gate, we can build many other types of logic gate functions, such as a NAND Gate and a NOR Gate or any
other type of digital logic function we can imagine.

But there are two other types of digital logic gates which although they are not a basic gate in their own right as
they are constructed by combining together other logic gates, their output Boolean function is important
enough to be considered as complete logic gates. These two “hybrid” logic gates are called the Exclusive-OR (Ex-
OR) Gate and its complement the Exclusive-NOR (Ex-NOR) Gate.

Previously, we saw that for a 2-input OR gate, if A = “1”, OR B = “1”, OR BOTH A + B = “1” then the output from
the digital gate must also be at a logic level “1” and because of this, this type of logic gate is known as an
Inclusive-OR function. The logic gate gets its name from the fact that it includes the case of Q = “1” when both
A and B = “1”.

If however, an logic output “1” is obtained when ONLY A = “1” or when ONLY B = “1” but NOT both together at
the same time, giving the binary inputs of “01” or “10”, then the output will be “1”. This type of gate is known as
an Exclusive-OR function or more commonly an Ex-Or function for short. This is because its boolean
expression excludes the “OR BOTH” case of Q = “1” when both A and B = “1”.

In other words the output of an Exclusive-OR gate ONLY goes “HIGH” when its two input terminals are at
“DIFFERENT” logic levels with respect to each other.

/
An odd number of logic “1’s” on its inputs gives a logic “1” at the output. These two inputs can be at logic level “1”
or at logic level “0” giving us the Boolean expression of:  Q = (A ⊕ B) = A.B + A.B

The Exclusive-OR Gate function, or Ex-OR for short, is achieved by combining standard logic gates together to
form more complex gate functions that are used extensively in building arithmetic logic circuits, computational
logic comparators and error detection circuits.

The two-input “Exclusive-OR” gate is basically a modulo two adder, since it gives the sum of two binary numbers
and as a result are more complex in design than other basic types of logic gate. The truth table, logic symbol and
implementation of a 2-input Exclusive-OR gate is shown below.

The Digital Logic “Exclusive-OR” Gate

2-input Ex-OR Gate

Symbol Truth Table

B A Q

0 0 0

0 1 1

2-input Ex-OR Gate


1 0 1

1 1 0

Boolean Expression Q = A ⊕ B A OR B but NOT BOTH gives Q

 
Giving the Boolean expression of:  Q = AB + AB

The truth table above shows that the output of an Exclusive-OR gate ONLY goes “HIGH” when both of its two
input terminals are at “DIFFERENT” logic levels with respect to each other. If these two inputs, A and B are both
at logic level “1” or both at logic level “0” the output is a “0” making the gate an “odd but not the even gate”. In
other words, the output is “1” when there are an odd number of 1’s in the inputs.

This ability of the Exclusive-OR gate to compare two logic levels and produce an output value dependent upon
the input condition is very useful in computational logic circuits as it gives us the following Boolean expression
of:

Q = (A ⊕ B) = A.B + A.B

/
The logic function implemented by a 2-input Ex-OR is given as either: “A OR B but NOT both” will give an
output at Q. In general, an Ex-OR gate will give an output value of logic “1” ONLY when there are an ODD
number of 1’s on the inputs to the gate, if the two numbers are equal, the output is “0”.

Then an Ex-OR function with more than two inputs is called an “odd function” or modulo-2-sum (Mod-2-SUM),
not an Ex-OR. This description can be expanded to apply to any number of individual inputs as shown below for
a 3-input Ex-OR gate.

3-input Ex-OR Gate

Symbol Truth Table

C B A Q

0 0 0 0

0 0 1 1

0 1 0 1

0 1 1 0

3-input Ex-OR Gate


1 0 0 1

1 0 1 0

1 1 0 0

1 1 1 1

Boolean Expression Q = A ⊕ B ⊕ C “Any ODD Number of Inputs” gives Q

 
Giving the Boolean expression of:  Q = ABC + ABC + ABC + ABC

The symbol used to denote an Exclusive-OR odd function is slightly different to that for the standard Inclusive-
OR Gate. The logic or Boolean expression given for a logic OR gate is that of logical addition which is denoted by
a standard plus sign.

The symbol used to describe the Boolean expression for an Exclusive-OR function is a plus sign, ( + ) within a
circle ( Ο ). This exclusive-OR symbol also represents the mathematical “direct sum of sub-objects” expression,
with the resulting symbol for an Exclusive-OR function being given as: ( ⊕ ).

/
We said previously that the Ex-OR function is not a basic logic gate but a combination of different logic gates
connected together. Using the 2-input truth table above, we can expand the Ex-OR function to: (A+B).(A.B)
which means that we can realise this new expression using the following individual gates.

Ex-OR Gate Equivalent Circuit

 
One of the main disadvantages of implementing the Ex-OR function above is that it contains three different
types logic gates OR, NAND and nally AND within its design. One easier way of producing the Ex-OR
function from a single gate is to use our old favourite the NAND gate as shown below.

Ex-OR Function Realisation using NAND gates

 
Exclusive-OR Gates are used mainly to build circuits that perform arithmetic operations and calculations
especially Adders and Half-Adders as they can provide a “carry-bit” function or as a controlled inverter, where
one input passes the binary data and the other input is supplied with a control signal.

Commonly available digital logic Exclusive-OR gate IC’s include:

TTL Logic Ex-OR Gates

74LS86 Quad 2-input

CMOS Logic Ex-OR Gates


/
CD4030 Quad 2-input

7486 Quad 2-input Exclusive-OR Gate

 
The Exclusive-OR logic function is a very useful circuit that can be used in many different types of
computational circuits. Although not a basic logic gate in its own right, its usefulness and versatility has turned it
into a standard logical function complete with its own Boolean expression, operator and symbol. The Exclusive-
OR Gate is widely available as a standard quad two-input 74LS86 TTL gate or the 4030B CMOS package.

One of its most commonly used applications is as a basic logic comparator which produces a logic “1” output
when its two input bits are not equal. Because of this, the exclusive-OR gate has an inequality status being
known as an odd function. In order to compare numbers that contain two or more bits, additional exclusive-OR
gates are needed with the 74LS85 logic comparator being 4-bits wide.

In the next tutorial about Digital Logic Gates, we will look at the digital logic Exclusive-NOR gate known
commonly as the Ex-NOR Gate function as used in both TTL and CMOS logic circuits as well as its Boolean
Algebra de nition and truth tables.

86 Comments

Join the conversation

Your Name

/
Email Address

Write your comment here

Notify me of follow-up comments by email.

SUBMIT

Kashif ashraf
About digital electronics

Posted on April 27th 2019 | 5:29 pm


 Reply

Birhanu demelash
To get the answer of the exclusive OR function is an odd function and then formulate the truth table only
when the total number of 1 s in A,B,C and D.

Posted on May 23rd 2019 | 10:25 pm


 Reply

Richard White
/
I have a problem with two signals being monitored for timing purposes. I must know that both have
occurred and I cannot tell the difference between only one having occurred or both at
precisely the same time.
I’m a mechanical engineer so this is not my specialist subject. I would appreciate some help.

Thank you

Posted on June 23rd 2019 | 10:35 am


 Reply

shubham sharma
about boolean expression in simple words.

Posted on August 03rd 2019 | 9:00 am


 Reply

abeera
LAST one is WRONG, the answer is 0.

Posted on August 25th 2019 | 10:26 am


 Reply

BhaskarD
No, that is correct because
1111
——
01=1

Posted on September 18th 2019 | 6:34 am


 Reply

Wayne Storr
The tutorial is correct as given
/
Posted on August 25th 2019 | 1:04 pm
 Reply

srinivas nallam
Nice explanation sir.
I am so thankful to you. 3 gated XOR was quiet confusing.

Posted on August 29th 2019 | 8:31 am


 Reply

md. shamim hossain


important..

Posted on September 19th 2019 | 10:31 am


 Reply

Franchesca
The toturial should be answered according to the questions asked.

Posted on October 22nd 2019 | 8:44 am


 Reply

CristineBriones
ABC+A’B+ABC’

Posted on October 28th 2019 | 11:51 pm


 Reply

/
Tasin Sarker
X-Nor gate
1+1+1=?

Posted on November 11th 2019 | 2:30 pm


 Reply

More

FREDRICK OMOGI OBUYA


FREDRICK OMOGI OBUYA

Posted on November 13th 2019 | 1:11 pm


 Reply

Joe Austin's
I wa requesting if you may help me in solving the problem on xor gate

Posted on November 20th 2019 | 6:36 pm


 Reply

Viruddhagiri
Nice

Posted on December 09th 2019 | 5:54 am


 Reply

Folarin
Very helpful….. Thanks
/
Posted on April 12th 2020 | 2:30 am
 Reply

BOJEDLA SAI SUDHEER


Elections

Posted on April 19th 2020 | 2:15 pm


 Reply

View More

You might also like