Binary original code, reverse code (done), and reverse code
In one case, you can understand the source code, reverse code, and complement code.
First, write down the following seven rules:
For signed,
1. The highest bit of binary is the sign bit;
(0 indicates a positive number, and 1 indicates a negative number)
2. The original codes, backcodes, and supplementary codes of positive numbers are the same;
3. Negative negative anticode = the symbol bit of the original code remains unchanged, and the others are reversed (0 is changed to and 0 );
4. complement the negative number = its anticode + 1;
5.0 of the reverse code, and the completion code is 0;
6. Java has no unsigned number. In other words, the number in Java is signed;
7. During computation on the computer, the computation is based on the complement code. (This sentence indicates that we have to switch between the two to demonstrate the computing process. Bitter smile)
The following is a demo of Computing: 1-2.
Interesting ~~