I think the wording in the

cup size campfire story is a little confusing, but it is basically stating that as far as Java is concerned, it stores zero as a positive number, therefore when counting the possible positive numbers, you have to subtract one for the place that zero is held in.

Consider a storage

unit where I am storing my numbers in only 4 bits (a nibble - half an 8 bit byte), and using the uppermost bit for indicating whether the number is positive or negative:

Note: You do not need to know about nibbles for Java - it just helps to have a nice small unit that I can use to demonstrate bit storage.

So our nibble can potentially store the negative numbers from -1 through to -8. It can also store the positive numbers 1 through to (8 - 1) = 7. The - 1 is in there because zero is a positive number, which means that we have to reduce our potential positive numbers by one (or count the zero as -1 from the range of potential positives (I think that is what the campfire story is trying to say)).

Alternatively, our range is from (-2³) to (2³) -1. Again the -1 is in there because we need to account for zero.