Experiment 2  The 2bit Identity Comparator
How can vou verify if two 2bit numbers are the same?
For this you need more than just XNOR gates.
An identity comparator compares two 2bit numbers by checking
each digit individually using a XNOR gate.
From the truth table you can see that this is not enough.
Only if x_{0}
is identical with y_{0}
AND x_{1}
is identical with y_{1},
are the two numbers identical.
You need an extra AND gate.
x_{1} 
x_{0} 
y_{1} 
y_{0} 
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 2bit identity comparator.

Circuit diagram of a 2bit identity comparator.
Circuit of a 2bit identity comparator.
(Enlarge)

This concept can be extended to arbitrarily large numbers...