True Value:
The true value of a positive or negative number is a positive or negative sign before the binary number corresponding to the absolute value.
For example, the true value of 2 is + 00000010.
-2 has a true value of-00000010.
(The positive number can be omitted)
Negative
Original code:
The original code of positive numbers is the corresponding binary number, for example, the original code of 2 is 00000010;
The original code of a negative number is the first digit of the binary number corresponding to its absolute value to 1, for example, the original code of-2 is 10000010
(The first digit of the original code indicates the symbol bit, 0 indicates positive, and 1 indicates negative)
Anti-code:
The reverse code of a positive number is the same as the original code;
A negative number is used to reverse the original code, except for the symbol bit.
Complement:
The positive complement is the same as the original code;
The complement of a negative number is to add 1 at the end of its anticode.
Code transfer:
The QR code is obtained after the signed bits of the complement code are obtained. It is introduced to facilitate the comparison of the size.
For example ):
2-2
True Value: 00000010-00000010
Original code 00000010 10000010
Reverse code 00000010 11111101
Makeup 00000010 11111110
Code transfer 10000010 01111110
0-0
True Value: 00000000-00000000
Original code 00000000 10000000
Reverse code 00000000 11111111
Makeup 00000000 00000000
Code transfer 10000000 10000000