Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - 2020- 12-20: Why is the absolute value of the smallest negative integer greater than that of the largest positive integer 1?
2020- 12-20: Why is the absolute value of the smallest negative integer greater than that of the largest positive integer 1?
Negative numbers are stored according to the complement, that is, the highest bit is the sign bit, 0 is positive and 1 is negative.

For example, integers are stored in n bits,

The largest positive number is that the sign bit is 0, and the rest n- 1 bits are 1, that is, 2 (n- 1)- 1.

The smallest negative number is that the sign bit is 1, and the remaining n- 1 bits are all zeros. According to the rule of complement, subtract 1 and then take the reverse, and its absolute value is 1, and the rest bits are all 0, that is, 2 (n- 1).

Therefore, the absolute value of the smallest negative integer is greater than that of the largest positive integer 1.