8 bit Binary Magnitude comparator

Discussion in 'The Projects Forum' started by allaboutlogic, Jan 9, 2015.

  1. allaboutlogic

    Thread Starter New Member

    Jan 9, 2015
    4
    0
    Hi,

    Can you design a 8 bit magnitude comparator with using only simple 2x1 MUX with minimum logic gates?
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    A parallel 8-bit magnitude comparitor requires simultaneously operating on 16 bits of data. Muxes only allow you to look at half the data at a time, so do not seem well suited.

    A serial magnitude comparator, where a pair 1 of 8 bits are selected out of the two 8 bit bytes, could utilize a tree of muxes.
     
  3. allaboutlogic

    Thread Starter New Member

    Jan 9, 2015
    4
    0

    I mean, I made it with 70-80 MUXes, i want to decrease the number,
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Why would you want to? Is this homework?
     
  5. allaboutlogic

    Thread Starter New Member

    Jan 9, 2015
    4
    0
    It's a question from somebody, but we will decide the minimum number of 2x1 muxes
     
  6. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    You should not need THAT many muxes to do the job.
    You probably could make a unit that compares one bit position strating with MSB, if one bit is higher than that number wins, if they are the same you enable the next stage, repeat until you reach LSB.
     
  7. allaboutlogic

    Thread Starter New Member

    Jan 9, 2015
    4
    0
    I finally reduced the number to the minimum I think.

    I managed to implement it with 23 MUXes.
     
  8. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    Care to show your schematic?
     
  9. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,691
    2,756
    Just my 2 cents...not entirely relevant:

    A NAND gate can be built with two 2:1 muxes. Therefore, any logic function can be realized by a combination of 2:1 muxes.
     
    kubeek likes this.
Loading...