Home > Back-end >  The 2020-12-20: why is the absolute value of the minimum negative integer is greater than the maximu
The 2020-12-20: why is the absolute value of the minimum negative integer is greater than the maximu

Time:12-21

The 2020-12-20: why is the absolute value of the minimum negative integer is greater than the maximum positive one? # # f greatly architects a daily topic

CodePudding user response:

Can be post integration

CodePudding user response:

Because of 0, the n + 1 bit integer, divided into negative and the negative,

Non-negative integers: 0 to 2 ^ n - 1
Negative integer: - 1-2 ^ n

A total of 2 ^ (n + 1), minimum negative: - 2 ^ n largest integer: 2 ^ n - 1

CodePudding user response:

This is a computer store data with the complement of
In a world of complement, integer range is
0 x8000000000000000 x7fffffffffffffff 0
Highest level is the sign bit, but for no is 0 0 0
The
0 x0000000000000000 (the original code is 0)
0 x8000000000000000 (original code 0)
Because 0 regardless of positive and negative are the same, so the original code of a negative zero is meaningless, for complement, negative zero just the minimum value is negative (boundary value)
So, of the absolute value of the minimum negative plastic is greater than the maximum positive 1,
  • Related