|
"Using a similar program, you can find that -32768 is actually represented as 4294934528, which is 11111111111111111000000000000000."
Note: I said short int, short ints are 16 bits. I do it in short ints, because that's what i'm use to, and I don't feel like writing 32 zeros.
from my experiences when i was 13 or so working on my C server i used short ints.
V this is my experience with them
32767
Before: 0111111111111111
32767 health + 1 health
After: 1000000000000000
-32768 poor guy
Ex: 1111111111111111
-1
-1 + 1
Result: 00000000 00000000
0
Oh, lol, I didn't realize i put
"11111111 11111111 = -32768"
I'm on 6 hours of sleep for 3 days pardon me. Didn't go sleep saturday night.
I don't see the point of the inverse and add 1 you were doing.
__________________
R
|