Sunday, July 7, 2013

on

The Exclusive-OR Gate

Definition

Previously, we have seen 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 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 is achieved by combining standard logic gates together to form more complex gate functions. An example of a 2-input Exclusive-OR gate is given below.

The Digital Logic "Ex-OR" Gate

2-input Ex-OR Gate

SymbolTruth Table
exclusive-or gate
2-input Ex-OR Gate
BAQ
000
011
101
110
Boolean Expression Q = A     B Read as A OR B but NOT BOTH gives Q
Then, 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. 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

SymbolTruth Table
3-input EX-OR gate
3-input Ex-OR Gate
CBAQ
0000
0011
0101
0110
1001
1010
1100
1111
Boolean Expression Q = A     B     C Read as "any ODD number of Inputs" gives Q

The symbol used to denote an Exclusive-OR 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 a combination of different basic logic gates and using the 2-input truth table above, we can expand the Ex-OR function to: Q = (A      B) = (A+B).(A.B) which means we can realise this new expression using the following individual gates.

Ex-OR Gate Equivalent Circuit

exclusive-or gate equivalent
One of the main disadvantages of implementing the Ex-OR 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 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 gate 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 Exclusive-OR gate IC's include:
  TTL Logic Types
  •  
  • 74LS86 Quad 2-input
  CMOS Logic Types
  •  
  • CD4030 Quad 2-input

Quad 2-input Ex-OR Gate 7486

2-input Ex-OR gate 7486
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 definition and truth tables.

0 comments:

Post a Comment