posted 23 years ago
This is something with regard to arithmetic operations.
Hex. representation of -128 is 0xFF80(this is the 2's complement of 128)
Hex. representation of -1 is 0xFFFF(2's complement of 1)
When you say '--b' what happens is b=b-1 i.e.b=(-128)+(-1)
or
b=(0xFF80) + (0xFFFF)
thus b=0x007F
thus b=127 as 7F is Hexadecimal representation of 127
-Nysal