Hi all,
In order to get a digital magnitude comparator, we first need to know the format of the digital signal. For this example, lets say we're using a single hexidecimal digit = 4 binary digits. There will be two sets of this 4-bit input, we'll call them A & B. A relatively simple way for this type of input is to use a 4-input and gate. It's easy to connect up. Bit 0 from A goes to the 1st of 4 each, two-input And gates, next, the Bit 0 from B goes to the other input of the 1st And gate. Just repeat the process for all 4 bits from both A&B inputs and the output of the 4-input and gate will be high when the magnitudes of A & B are the same. Another way of course, is to use a microprocessor, like a PIC chip, read input A into the accumulator, and do a logical and function on the memory location of input B.
As far as the first method goes, since you can combine and gate outputs by using another and gate, you can make the magnitude comparator for as many bits as you need. If you use a microprocessor or DSP, you'll have to work around the maximum number of bits it's designed for, by using software, if your magnitudes exceed the processor's number of bits. For example, if you have an 8-bit processor, but need a 16-bit magnitude compare, you can still do this, but you have to get clever with your software if using assembly language.