2010-12-24, 08:17 PM
MissingLink Wrote:Sorry to be picky, but
0xFFFFFFFF is -1
0x80000000 is -whatever billion
Umm... Not necessarily.
Every F is equal to 1111 in binary. The first bit is the Sign bit, the following bits are the Value. if this was simple 4 bit signed number, then F (1111) would be -7. 0111 would be 7.
Any HEX represented number with the first digit greater than 8 would be negative. (Assuming the first bit is the sign, which varies by system.)
0x00000001 = 1
0x80000001 = -1
But again, it can vary widely by processor system. Some systems use the first bit as 0 for negative and 1 for positive numbers, in which case
0x00000001 = -1
0x80000001 = 1
The numbers you are quoting look to be One's Complement versions. In which case an all F number would be 0. But it's silly to nitpick when you are only half right.

