Boolean Algebra: How do I implenent a 4 bit signed comparator
Let's list all of the 4-bit 2's-complement numbers from smallest to largest, and also list all of the 4-bit unsigned numbers from smallest to largest. You know how to compare the unsigned numbers. Can you see a simple way to convert (map) the 2's-complement numbers to unsigned numbers, preserving the sort order?
2's complement  unsigned
==============  ========
      -8  1000  0000   0  (smallest)
      -7  1001  0001   1
      -6  1010  0010   2
      -5  1011  0011   3
      -4  1100  0100   4
      -3  1101  0101   5
      -2  1110  0110   6
      -1  1111  0111   7
       0  0000  1000   8
       1  0001  1001   9
       2  0010  1010  10
       3  0011  1011  11
       4  0100  1100  12
       5  0101  1101  13
       6  0110  1110  14
       7  0111  1111  15  (largest)