Exclusive OR Gate
 Muhammad Shahid
 m_shahid@live.co.uk

288Views
 0 Comments
ExclusiveOR Gate
The ExclusiveOR gate gives an output given by the expression “A or B not Both”. It means that the output of the ExclusiveOR gate is low when both inputs “A” and “B” are at the same logic level i.e. both “HIGH” or “LOW”. In the case of, either “A” or “B” that is “01” or “10” the output of the ExclusiveOR gate will be “HIGH”.
The ExclusiveOR is also referred to by writing only ExOR or XOR. The ExOR is a very useful logic and is mostly used in arithmetic, error detection, and computational circuits.
The logic ExOR is constructed using basic logic gates which are AND, OR, and NOT gates. Although using these basic logics many functions/ logics can be constructed but the importance of ExOR logic has led it to be constructed as a separate logic gate. Because of its construction from multiple basic logic gates, it is also called a “hybrid” logic gate. The logic OR gate, which was discussed in the previous article, is an inclusiveOR function which states to include both “A” and “B” states in logic “HIGH” output. Whereas, as mentioned earlier in this article, the ExOR logic excludes states of both “A” and “B” inputs from the logic “HIGH” output. Because of the inclusion and exclusion of both input states, the logic OR is termed as inclusiveOR and ExclusiveOR, respectively. In simple words, the output of ExOR logic goes “HIGH” only when both inputs are different.
The Boolean algebraic equation is given below:
Logic ExOR Gate Symbol & Truth Tables
The representation of an ExOR logic by a symbol is shown in the following figure. Basically, a twoinput ExOR logic is a modulo twoadder as it gives the sum of two binary numbers.
The truth table of a twoinput ExOR logic is shown below:
It is clear from the truth table that when inputs are at different levels i.e. either “01” or “10” then the ExOR logic output is “HIGH” and in case the inputs are at the same level then output is “LOW”. In other words, “A” or “B”, not both!.
The Boolean equation of ExOR logic is:
The expression for an inclusiveOR logic consists of a plus symbol between the operands and denotes a logical addition/summation of the inputs. Whereas, the expression of ExclusiveOR logic comprises a plus sign within a circle between the operands. The circle basically describes a direct sum of subobjects.
The logic function performed by a more than twoinput ExOR gate is basically a modulo 2 sum and is not an ExOR logic. The truth table of a threeinput ExOR logic is as follow and can be expanded to include any number of inputs:
For three input ExOR logic, when there is an odd number of inputs with logic “HIGH” then the output is “HIGH” and this characteristic makes the ExOR an odd gate. Moreover, the ability of ExOR to compare logics at the input and to produce results at the output based upon inputs is really useful in arithmetic, errordetection, and computational circuits.
The symbol and expression of a 3input ExOR logic are given below:
ExOR (XOR) Logic Circuit
Using the above equation of a twoinput ExOR logic, an equivalent circuit can be constructed which is shown in the following figure.
The above equivalent ExOR logic comprises AND, OR, and NAND logics. However, it is not a good practice to include multiple logics for the construction of logic gates and a better ExOR circuit can be constructed using only NAND logic gates.
The construction of ExOR gate using NAND gates only is shown below:
The ExclusiveOR logic gates are helpful in performing arithmetic operations such as addition in the form of Adders and HalfAdders. They have the ability to provide a “carrybit” or as a controlled inverter to facilitate the addition of larger binary numbers.
Commercially Available EOR (XOR) Gates
The XOR logic gates are available in both TTL and CMOS logic families. The most commonly used XOR logic packages are:
CMOS based XOR Gate IC Package
 CD4030B Quad 2input
TTL based XOR Gate IC Package
 74LS86 Quad 2input
Example of XOR Logic
In the following figure, an XOR gate is used to drive a 12V relay to switch on the lamp using NI Multisim. The XOR gate (74LS86) turns off the relay when all of the inputs are connected to VCC/ Ground. The relay thus turns off the lamp through an external circuit of 12V. When one of the inputs is connected to VCC, XOR logic goes “ON” turning the relay and lamp to “ON” state.
Conclusion
 The output of the ExOR logic is “LOW” when all of the inputs are in logic “HIGH” or “LOW” states.
 The ExOR gate outputs logic “HIGH” only when inputs are different (not the same).
 The ExOR logic is not a basic logic but obtained the status of logic due to its usefulness and versatility.
 It is mostly used in arithmetic, computational and errordetecting circuits.
 It is also mostly used as a logic comparator because of its ability to compare logical inputs.
 It is widely used in FullAdders and HalfAdders circuits to binary numbers,
 The ExOR logic gates are commercially available in both TTL and CMOS packages.
 An external circuit can be controlled by ExOR logic with the use of a magnetic relay.