Read Java's source code this morning and discover:
The following value is used when the calculator is converted to decimal:
And then I wonder, the minimum value of an integer, can't be how big is it?
Then decisively write code verification:
The Riddle reveals:
0x80000000 is the minimum value of integer, but the form of the complement is stored, this special value, according to the arithmetic rules, the original code is also this value .
The code rules for the complement transcoding are as follows:
Positive number: Original code = Inverse Code = complement
Negative Number: The original code = complement to reverse (sign bit of the figure) + the bottom 1
Original code to complement:
Positive: complement = original Code = Inverse Code
Negative: complement = original code negation (number outside the sign bit) + 1
Summary: tamping basic knowledge
Java integer storage is in 2 complement form