Page 79 - Handout Digital Electronics
P. 79
The major disadvantage (problem) with the comparator for equality is that if the numbers are not equal,
it does not show which number is greater or less than the other.
Activity
1 Given an XOR gate truth table, explain why it is used as a comparator for equality?
2 Is it possible to use NOR gates to design a comparator for equality? Design a comparator for equality
using NOR gates instead of XNOR gates
3 What is the reason behind comparisons?
9.6 Full Comparator
A full comparator is more helpful than a comparator for equality. Consider the design of a 1- bit
magnitude full comparator.
Consider two 1-bit binary numbers A and B to be compared for:
• Greater than (A > B)
• Less than (A < B)
• Equality (A = B)
The relationship between the inputs (A and B) and the outputs say X, Y, Z are as follows:
X Y Z
A>B 1 0 0
A<B 0 1 0
A=B 0 0 1
To design this full comparator, the following steps are needed:
Step 1: Produce the truth table
Produce the truth table
A B X Y Z
0 0 0 0 1
0 1 0 1 0
1 0 1 0 0
1 1 0 0 1
79

