Electrical – 5bit signed magnitude comparator

binarycircuit-designcomparatorlogic-gates

enter image description here

I know how to compare unsigned binary numbers.

But can you help me compare any signed binary numbers?

Above is my simulation but I don't know how to integrate those signed bits in my circuit correctly. In that setup, my output also reads my signed bit as one of the input not as a polarity.

Best Answer

There are many ways to represent signed binary. Each has advantages for different useage.

  • 1's complement, ( simple but has a +/-0)
  • 2's complement, (invert and add 1, better for carry operations)
  • offset binary, (biased so it is monotonic in binary and decimal then zero=10000...)

Once you decide which source representation then you can convert to the standard notiation required for the SN7485N in straight binary or BCD as you wish.

Which source representation did you mean?