There are three methods for a computer to express the number of symbols: original code, reverse code, and complement code.
8-digit
Original codeAnd
Reverse codeThe range that can represent the number is -127 ~ 127
8-digit
ComplementThe range that can represent the number is -128 ~ 127
So since the range is-128 ~ 127, it must be indicated by a supplementary code.
000-11111111 indicates-128 to-1, and indicates 0-127.
The 1111 1111 of the complement code is converted to the original code 1000 0001, that is,-1.
Complement is a method of binary representing negative numbers. the complement of a negative number is to add one to the anticode, while the positive number remains unchanged. The original positive number is the same as the reverse code. (-0) is replaced by (-128) in the complement code, so the range of the complement code is:
(-128 ~ 0 ~ 127) a total of 256.
Note: (-128) there is no corresponding source code and reverse Code, (-128) = (10000000)