by TheJuggler » Thu Aug 06, 2009 2:19 am
by TheJuggler
Thu Aug 06, 2009 2:19 am
That's all assuming that the byte is unsigned.
If it's signed then when you add 3 to 255, you'll get a negative number, and likewise when you subtract 3 from 0 you'll get -3. (although 255 isn't really possible since there are only 7 bits available for data meaning that you can get a max of 127.)
But if it's signed, then the maximum value is 127, as the most significant bit will be the sign bit.
That's all assuming that the byte is unsigned.
If it's signed then when you add 3 to 255, you'll get a negative number, and likewise when you subtract 3 from 0 you'll get -3. (although 255 isn't really possible since there are only 7 bits available for data meaning that you can get a max of 127.)
But if it's signed, then the maximum value is 127, as the most significant bit will be the sign bit.
Last edited by TheJuggler on Thu Aug 06, 2009 6:17 pm, edited 1 time in total.