Experiment 2 - The 2-bit Identity Comparator
How can vou verify if two 2-bit numbers are the same?
For this you need more than just XNOR gates.
An identity comparator compares two 2-bit numbers by checking
each digit individually using a XNOR gate.
From the truth table you can see that this is not enough.
Only if x0
is identical with y0
AND x1
is identical with y1,
are the two numbers identical.
You need an extra AND gate.
x1 |
x0 |
y1 |
y0 |
x=y |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
Truth table of a 2-bit identity comparator.
|
Circuit diagram of a 2-bit identity comparator.
Circuit of a 2-bit identity comparator.
(Enlarge)
|
This concept can be extended to arbitrarily large numbers...