Monday, January 5, 2015

Reverse Engineering - Starting

RE - refreshing....


Negative representation of negative numbers

  • Signed-bit representation
          011=3
          111=-3

          Problem : two values for zero (000 and 100)


  • Two's complement representation
          101 = -3
          110 = -2
          111= -1
          000 = 0
          001= 1
          010=2
          011=3

          Adding 1 to any number produces the next number (ignoring carry bits)
          To find the opposite number for any given number :

  1. change all 1's to 0's and all 0's to 1's
  2. Add 1

No comments:

Post a Comment