Friday, 15 January 2010

binary - NOT or compliment of a number? -


Assume: 2 compliments, integer is just a quick question why if there is a number and it does not take So it would be negative + or -1. For example:

  553481923 ~ 553481923 = -553481924 2147455726 ~ 2147455726 = -2147455727 -2147455725 ~ -2147455725 = 2147455724   

I think the bit inverted Are there. Is there any reason for this happening, or is it just a coincidence?

This is due to the path of 2 supplementation notation works.

For supplement 2, supplement 8 of

2 for the complementary integer of (- 2 ^ 31) (2 ^ 31 - 1) Bit value:

  0000 0000 = 0 (base 10)   

and the complementary negative 8 bit value:

  11111111 = -1 (base 10)    

No comments:

Post a Comment