Building a 2 bit comparator using either....

Click For Summary
SUMMARY

This discussion focuses on building a 2-bit comparator using multiplexers (MUXs). The key steps involve creating a truth table for both the comparator and MUXs to understand their functions. The primary conditions to detect are whether variable 1 is larger than variable 2, variable 2 is larger than variable 1, or if they are equal. The recommended approach is to compress the 16 possible bit combinations into fewer bits, ultimately simplifying the output using MUXs.

PREREQUISITES
  • Understanding of 2-bit comparators
  • Familiarity with multiplexers (MUXs)
  • Knowledge of truth tables
  • Basic digital logic design principles
NEXT STEPS
  • Research how to create truth tables for digital circuits
  • Learn about the design and implementation of multiplexers
  • Study techniques for reducing bit combinations in digital logic
  • Explore practical applications of 2-bit comparators in digital systems
USEFUL FOR

Electronics students, digital logic designers, and engineers interested in building and optimizing digital comparators using multiplexers.

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
 
Physics news 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
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
19K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 25 ·
Replies
25
Views
12K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
9K
Replies
2
Views
2K