Values have positive and negative values, and the computer uses the highest bit of a number to store the symbols (0 is positive, 1 is negative ). this is the original code of the number of machines. assume that the number of digits processed by the machine is 8. that is, the word length is 1 byte, and the original code can indicate the value range is 127 ~ (-127)
Source code-anti-code-supplemental code-transfer code
Original code: binary (the first symbol at the beginning is 0 positive and 1 negative)
Anti-code: based on the original code, the symbol is not moved, and the other digits are reversed.
Complement: Based on the anticode, the operation is + 1
Shift code: Based on the complement code, the symbol bit is reversed.
101011 (Binary) --> original code 00101011 --> reverse code 01010100 --> supplemental code 01010101 --> transfer code 11010101