Skip to main content
3 events
when toggle format what by license comment
Aug 3, 2019 at 22:03 comment added Yuval Filmus 128 is not between -128 and +127. As for how to tell whether a number is signed or unsigned, it’s impossible. It’s up to the programmer to decide whether she interprets a byte as a signed 8-bit integer, an unsigned 8-bit integer, or anything else.
Aug 3, 2019 at 20:51 comment added bee5911 So does this mean that 128 is 10000000 when we are using 8 bits and it will not be confused for a negative number? Then how can we tell if we are looking at a negative 8-bit number or an unsigned 8-bit number (in cases where the first bit is 1)?
Aug 3, 2019 at 8:11 history answered Yuval Filmus CC BY-SA 4.0