How using two-input logic gates of your choice design a circuit to determine if two 3-bit numbers are the same or different?
Three 2-input XOR gates and one 3-input NOR gate will do the
work. Connect each output of each XOR gate to one input of the
3-input NOR gate and apply the two 3-bit words to the inputs of the
XOR gates. If X (X2X1X0) and Y(Y2Y1Y0) are two 3-bit words, X2 and
Y2 will connect to one XOR gate, X1 and Y1 to the next XOR gate and
X0 and Y0 to the last XOR gate. You could see the result of the
operation on a LED connected to the output of the NOR gate. Other
implementations are also possible of course.
The solution above is absolutely correct, but includes a 3 input
gate. If the task is to use only two input gates, then a small
change will be needed. Take the outputs from any two XOR gates into
a 2 input OR gate. Then take the output of the OR gate and the
output of the third XOR gate into a 2 input NOR gate. The operation
remains identical to the first solution but adheres to the brief of
using gates with 2 inputs. In the real world, there is probably no
reason to impose such a limitation on a design so the first
solution would normally be the preferred route to take.