The binary of 32767 is 011111165438+.
The binary of ~ 10 is11111165438+.
Therefore, the complement by negative number is: the original code is counted from the right, the first 1 remains unchanged to the right (including the first 1), and the first 1 remains unchanged to the left.
So1111111116544. The first sign bit is 1, which means negative. The value of 10 1 1 is 1 1, so it is-1 1.
You can look at the knowledge of source code, complement and complement. ...