# How to build a 3-bit comparator using a multiplexer?

I need to (in design) create a 3-bit comparator using an 8-bit multiplexer and/or up to four 4-bit multiplexers. There are plenty of examples of how comparators and multiplexers works on the web. There are several examples of 2-bit comparators based on multiplexers. But nothing over 2 bits. After many hours of pondering and sketching I am beginning to think it is impossible.

Can someone tell me if it is even possible ? Am I beating my head against a concrete wall for no reason at all ? If it's possible can someone just give me a hint?

• Can you put here some schematics what were your thougths? – Chupacabras Feb 24 '17 at 7:23
• to clarify, you want to compare two 3-bit numbers for magnitude, using an unrealistically constrained set of logic parts? – Neil_UK Feb 24 '17 at 7:24
• Right ! Exactly ! No other components. Just these multiplexer chips. Compare two 3-bit values resulting in a 2-bit value representing equal, a>b and a<b (assigning any values to these results - the fourth of the 2-bit result is "undefined"). My sketches are on paper so that wont help. I have created a spreadsheet with the truth table sorted four different ways to try to ascertain a pattern, but I guess I'm getting tired because I sure don't see what I need. – DinosaurCoder Feb 24 '17 at 7:36
• I was thinking that I should use one of the values (3-bits) as the select into the 8-bit multiplexer then use the other value on the data pins (as well as "hard-wired" values to arrive at a matching truth table. But it's just not coming to me and I'm beginning to think it's actually not possible. – DinosaurCoder Feb 24 '17 at 7:38
• Oh yeah ! Thanks a bunch for the quick reply !!! REALLY !!! – DinosaurCoder Feb 24 '17 at 7:39