Pages

June 30, 2010

computer stores number on one/two's complemental code method. true code, complemental code and one's complement code of unsigned number are all equel;
For example, 10 (decimal) are all 00001010;

But -10(decimal):
true code:10001010 ('+' is 0, '-' is 1)

complemental code:11110101 sign bit doesn't change, rest all of bits ~

two's complemental code:11110110 base on complemental code plus 1

No comments:

Post a Comment