How could I go about building a 2-bit comparator that compares two 2-bit numbers and determines whether one is greater than or equal to the other?
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 and B1 B0, respectively, the truth table for A >= B looks like this:

B1 B0 A1   A0     A &gt;= B

 0  0  0    0       1
 0  0  0    1       1

 0  0  1    0       1
 0  0  1    1       1

 0  1  0    0       0
 0  1  0    1       1

 0  1  1    0       1
 0  1  1    1       1

 1  0  0    0       0
 1  0  0    1       0

 1  0  1    0       1
 1  0  1    1       1

 1  1  0    0       0
 1  1  0    1       0

 1  1  1    0       0
 1  1  1    1       1


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 &mdash; in two cases &mdash; it exactly matches the A0 input.

This means that you need no logic other than your 8:1 multiplexer, connecting B1, B0, and A1 to the select inputs, and then wiring the 8 data inputs to 0, 1, or A0 as appropriate:







simulate this circuit &ndash; Schematic created using CircuitLab