# Are either a Multiplexer or Decoder going to help me with this circuit design?

I have 2 2-bit inputs (eventually need to design for k-bit, but let's start here) and there are 2 2-bit outputs that output the max on one side and min on the other.

What I have so far... ...given the two inputs, I have one output that is 1 if X is Max or 0 if X is Min, and another output that is 1 if Y is Max, or 0 is Y is min.

Conceptually, I'm thinking to use these as inputs for a multiplexer, where one takes in both those inputs and uses them against the X and Y bits to determine which ones it's outputting to MAX, and another for MIN. Then I remembered that a Multiplexer gives out one bit.

I thought maybe another circuit we learned, a decoder, might be helpful, but I can't quite see that working either. Having explained my approach so far, can somebody guide me to the next steps? My teacher is very unresponsive, and threads relating to this problem have not been helpful, hopefully somebody can help me specifically with what I have so far!

• I'm not reading you very well. Do you want to take two k-bit inputs and compare them so that you always output the max value of the two on one k-bit bus and the min value of the two on the other k-bit bus? Or do you have some hidden max and min values somewhere you are comparing to? Or what? I'm not fully getting where you are headed. – jonk Oct 27 '16 at 0:51
• Could you please add a truth table to your question? – Daniel Oct 27 '16 at 0:55
• The truth table would be pretty large. I'm sorry if I was scattered and unclear. Let me try again. output1 is the bits of the larger input, output2 is the bits of the smaller input. So if you give it two inputs, one output represents the Max of the two, the other output represents the Min of the two. each input is k-bits, so each output is k-bits. – Natalie Spatharakis Oct 27 '16 at 1:11
• What I ended up doing, I can show in a picture -- I'm not quite sure if it's correct, but I think it is. I made 1 MUX that takes C1 and C2, which represent Cx = 1 if INPUTx is the larger one. And it determines there which bits, from X or Y, go into the MAX output. Then another for the MIN output, but "not"ing the Cs so it's for minimum. Does that....make sense? – Natalie Spatharakis Oct 27 '16 at 1:13
• A 4-input binary truth table should only ever be capable of 16 states. – Daniel Oct 27 '16 at 1:51 