Building a 2 bit comparator using either....

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 3K views
jisbon
Messages
475
Reaction score
30
Homework Statement
Build a 2-bit comparator using either two 74151 8-to-1 MUXs or two 3 to 8 binary decoders. Additional gates such as AND, NAND, OR, NOR, inverters can be used.
Relevant Equations
-
So I got this question while coming across, and I would like to seek some advice/tips for these types of questions.
1) Assuming I want to try and build using MUXs, I will get the truth table of both a 2 bit comparator and MUXs.

In this case: For comparator:
1599035278506.png

And for MUX:

1599035295443.png

So from what I learnt, MUX simply selects 1 input to be the output.
Is there any tips/tricks on to how to start with this question by possibly comparing the outputs? How should I be thinking to tackle these types of use 'something else'to build 'something' questions?
Thanks
 
on Phys.org
I haven't thought it all the way thru, but the first thing you must realize for THIS problem is there are 3 conditions to detect:
variable 1 is larger than variable 2
variable 2 is larger than variable 1
they are equal

In general, you want to reduce (compress) the incoming information from 16 possible bit combinations to some smaller number of bits; then repeat until you have reduced to the minimal number of output bits.

And I agree that using the MUX is probably the easiest approach mentally. (at least for you and me, others may differ!)

Cheers,
Tom