| > ...If you shift that range down so that 0 is in the middle of the range of values instead of the minimum... Not a downvoter, but: your concept of "shifting the range" is also misleading. In the source domain of 16-bit numbers, [0...65535] can be split into two sets: [0...32767]
[32768...65535]
The first set of numbers maps to [0...32767] in 2's complement.But the second interval maps to [-32768...-1]. So it's not just a "shift" of [0...65535] onto another range. There's a discontinuous jump going from 32767 to 32768 (or -1 to 0 if converting the other direction). And actually, we don't know if the processor used 2's complement or 1's complement -- if it was 1's complement, they would have a signed 0! I think they'd have to say "remapping" the range? On the whole, I think OP did about as well as you're going to do, given the audience. |
We can infer it used two's complement, and absolutely rule out one's complement or any signed-zero system, because the range is [-2^15,2^15) and with a signed zero you can't represent every integer in that range in 16-bits, you have one too many unique numbers.