|
Two's complement explained:
In an unsigned integer byte, the rightmost bit stands is the 1's place, and each successive bit to the left stands for twice the previous bit's place. There are 8 bits in a byte, so the leftmost bit in an unsigned integer byte is the 128's place. In a signed integer byte, everything is the same except for the leftmost bit, which stands for the opposite of what it does in an unsigned integer (-128 instead of 128).
__________________
Ameya Agaskar
Team 293 alumnus
|