In the previous tutorials, we saw that by using the three principal gates, 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 ExclusiveOR (ExOR) Gate and its complement the ExclusiveNOR (ExNOR) Gate.
Previously, we saw that for a 2input 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 InclusiveOR function. The 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 ExclusiveOR function or more commonly an ExOr 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 ExclusiveOR 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 ExclusiveOR Gate function, or ExOR 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 twoinput “ExclusiveOR” 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 2input ExclusiveOR gate is shown below.
Symbol  Truth Table  
2input ExOR Gate

B  A  Q 
0  0  0  
0  1  1  
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 ExclusiveOR 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 ExclusiveOR 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 2input ExOR is given as either: “A OR B but NOT both” will give an output at Q. In general, an ExOR 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 ExOR function with more than two inputs is called an “odd function” or modulo2sum (Mod2SUM), not an ExOR. This description can be expanded to apply to any number of individual inputs as shown below for a 3input ExOR gate.
Symbol  Truth Table  
3input ExOR Gate

C  B  A  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 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 ExclusiveOR odd function is slightly different to that for the standard InclusiveOR 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 ExclusiveOR function is a plus sign, ( + ) within a circle ( Ο ). This exclusiveOR symbol also represents the mathematical “direct sum of subobjects” expression, with the resulting symbol for an ExclusiveOR function being given as: ( ).
We said previously that the ExOR function is not a basic logic gate but a combination of different logic gates connected together. Using the 2input truth table above, we can expand the ExOR function to: (A+B).(A.B) which means that we can realise this new expression using the following individual gates.
One of the main disadvantages of implementing the ExOR function above is that it contains three different types logic gates OR, NAND and finally AND within its design. One easier way of producing the ExOR function from a single gate is to use our old favourite the NAND gate as shown below.
ExclusiveOR Gates are used mainly to build circuits that perform arithmetic operations and calculations especially Adders and HalfAdders as they can provide a “carrybit” 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 ExclusiveOR gate IC’s include:
The ExclusiveOR 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 ExclusiveOR Gate is widely available as a standard quad twoinput 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 exclusiveOR gate has an inequality status being known as an odd function. In order to compare numbers that contain two or more bits, additional exclusiveOR gates are needed with the 74LS85 logic comparator being 4bits wide.
In the next tutorial about Digital Logic Gates, we will look at the digital logic ExclusiveNOR gate known commonly as the ExNOR Gate function as used in both TTL and CMOS logic circuits as well as its Boolean Algebra definition and truth tables.
I need to join the group of tutorous
It is a good and helpful. Thamks
pls how can i made something with it
i want to know that truth table for 3 input xor gate and 3 input xnor gate are same or not.
if it is then what is the condition for that?
Obviously, they won’t have the same truth table.
Hi Pooja,
The truth table for ExOr Gate and ExNor gate is same when there are odd number of Inputs. when Number of the Inputs are even, their truth table will be complemented exactly.
I guess you just need to invert the outputs of 3 input xor gate from its truth table and you will get the truth table of 3 input xnor.
ExclusiveOR (ExOR) gates and ExclusiveNOR (ExNOR) gates operate differently and are not the same. Then their output states will be different.
I have gone through it, like so much I shall continue study, Thank so much R. Y. Merchant
explain thruth table
Nicely explained..very much useful for students…!!!
superb sir.. tnx
so, can some one come out the boolean expresion for exor 3 input?
Excellent website, almost teacher thought the same as like the material on this site.
Maybe he read it here first.