sauljaffe wrote:
We certainly do have negative values in Base 10 - we use them all the time!! As for the rest, see:
http://mathforum.org/library/drmath/view/62087.html
for a "professional" discussion of negative numbers in other bases. Yes, they do exist and no, the Apple calculator does not do them.
I am a professional mathematician (university professor), so I know there are negative numbers in any base :-)
I am also a programmer, so I understand binary representations, complement to 1, complement to 2, left and righ shifts, etc.
The calculator in programmer mode is not made to calculate like it does in other modes.
In particular, it does not show you negative numbers; it shows you what the bits for the integer look like (on a 64-bit word).
The fact that it does not calculate 0-5 is perplexing, at least at first; it actually seems to give -1. I think this just means an "overflow" error, as the calculator does not explicitly handle negative numbers *as such*. It handles 64-bit words, which the programmer can interpret as (binary, octal, decimal, hexadecimal) numbers (signed or unsigned).
If you want to compute 0-5, press 5 and click the "2's" button. That gives the "2's complement" of 5, which is the way the negative number -5 is *internally* represented. (For those who don't know, here is what 2's complement means: invert all bits, ie., change all zeros to ones and vice-versa; then add 1 to the result).
Five (just sixteen bits here, for short):
0000000000000101
Complement to 1:
1111111111111010
Minus five (complement to 2):
1111111111111011