Reference URL: http://www.cnblogs.com/zhangziqiu/archive/2011/03/30/ComputerCode.html
1, if the original code, so that the symbol bit also participate in the calculation, obviously for subtraction, the result is not correct. This is why the computer does not use the original code to represent a number.
2, set eight digits from high to low, respectively A7 A6 ... a0
The integer that it represents is:-a7* (2^7) +a6* (2^6) +a5* (2^5) +...+a0* (2^0)
Therefore, the smallest integer it can represent is: 10000000=-2^7=-128
The largest integer is: 01111111 = (2^7) -1=127
The desired minimum value of byte type, that is,-27.
The maximum value of the byte type, that is, 27-1.
3, 8-bit binary number is expressed in the range: -128 127
0,1,2,3,,127,-128,-127,-126,,-1,
4, about-1282 in the system is said:
The negative number is expressed by the complement, the complement of the positive number is its itself, the complement of the negative number is the binary system of 1,128 by the bit and the number of 10000000, the reverse is 01111111, plus 1 is 10000000.
5. Definition:
Original code: 10000000 This is-0 of the original code
: 11111111 This is-0 of the inverse code
: 10000000 This is-128 of the complement