In: Computer Science
Obtain expressions for the exclusive-OR and the equivalence functions of two variables A and B.
ANSWER :
The Exclusive-OR function is defined as a function which gives
an output 1 whenever either A or B is 1, but gives an output 0
whenever A and B are both 1 or both 0.
The equivalence function of two variables A and B is defined as a
function which gives an output 1 whenever both A and B are equal
(both 1 or both 0), but gives an output 0 whenever A and B are
unequal.
These two functions can be represented by a Truth Table as follows:
If A and B are binary variables, they can be represented in 4
different ways, giving us the 4 rows in the Truth Table. The Truth
Table is shown in figure 1.
We note from the Truth Table of fig. 1 that the exclusive-OR: and the equivalence functions are complements of each other. Also, from the Truth Table, we can write the equations:
a)Expressions for exclusive-OR
A × B = A' ∙ B + A ∙ B' . (This is a sum of products form of the expression obtained by considering entries of column 2 which are equal to 1). Also,
A × B = (A+B) • (A '+B') . (This is a product of sums form, obtained by considering entries of column two which are equal to 0.)
b) Expressions for Equivalence:
A ≡ B = A'∙B' + A∙B (Sum of products form)
A ≡ B = (A+B') • (A'+B). (Product of sums form)
We shall now realize the exclusive-OR and the equivalent functions, using a) NAND gates only, and, b) NOR gates only