Using an 8:1 multiplexer, I understand there are three inputs, so I'm not sure how I'd go about getting two 2-bit numbers, which would be four variables, not three. Any pointers on how to get started on this are appreciated.
A B C D X Y Z X Y Z
0 0 0 0 0 0 0 0 0 D
0 0 0 1 0 0 1
0 0 1 0 0 1 0 0 1 D
0 0 1 1 0 1 1
0 1 0 0 0 0 1 0 D D’
0 1 0 1 0 1 0
0 1 1 0 0 1 1 D D’ D’
0 1 1 1 1 0 0
1 0 0 0 0 1 0 0 1 D
1 0 0 1 0 1 1
1 0 1 0 1 0 0 1 0 D
1 0 1 1 1 0 1
1 1 0 0 0 1 1 D D’ D’
Best Answer
I think you understand the general approach, and since the "trick" required to answer this is rather subtle, I'm going to go ahead and spell it out.
Given two 2-bit numbers A and B, represented by the bits
A1 A0
andB1 B0
, respectively, the truth table for A >= B looks like this:I've deliberately grouped the rows in pairs, and I've put some extra space before the column for
A0
. Note that in each of the 8 groups, the answer is either always 0, always 1, or — in two cases — it exactly matches theA0
input.This means that you need no logic other than your 8:1 multiplexer, connecting
B1
,B0
, andA1
to the select inputs, and then wiring the 8 data inputs to 0, 1, orA0
as appropriate:simulate this circuit – Schematic created using CircuitLab