why the -1 in the positive limit of a range of a type?

Hello i read in some book that the range of:

int is: between (231-1) and (-231)
short is: between (215-1) and (-215)
long long is: between (263-1) and (-263)
...etc

my question is why the (-1) in the positive limit? and why the is no (-1) in the negative one?.
Last edited on
my question is why the (-1) in the positive limit?

Because 0 is included in the positive range of values.


and why the is no (-1) in the negative one?.

Because 0 is not included in the negative range of values.
thanks cire for the explanation.
Topic archived. No new replies allowed.