Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - int x =- 10; printf("%x,%o ",x,x); Seek results and explanations.
int x =- 10; printf("%x,%o ",x,x); Seek results and explanations.
Since you are a beginner, this question is still difficult for you.

Numbers are stored in a computer in the form of complement. On a 32-bit computer, you have to check the complement of-10 yourself. How to express it? Let me briefly say that the complement of a negative number is the complement of+1, except the sign bit, which is equal to the original code of its absolute value;

The binary code of 10 10 is 10, and the original code on a 32-bit computer is 1000000a, so the highest code is 1 because it is negative.

The anti-code is denoted as fffffff5.

The complement is expressed as ffffff6.

So %x output is: fffffff6.

%o output: 3777777766