Friday, 19 August 2011

Negative Numbers

Signed Bit Notation

has a leading 1 if its a negative number
1 0 0 1 0 0 0 0 = - 16
0 0 0 1 0 0 0 0 = + 16

Its Rubbish!
-Two Representations of zero
1 0 0 0 0 0 0
0 0 0 0 0 0 0

-Lose range because of the signed bit

Two's Complement
*Process
Invert and add 1
Only if its negative (and this has a leading 1)

1 1 1 1 0 1 1 1
0 0 0 0 1 0 0 0 INVERT
0 0 0 0 1 0 0 1 + 1 = - 9


No comments:

Post a Comment