Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - A signed 2-byte integer. Why is the minimum value -32768? Isn't the highest binary bit a sign bit?
A signed 2-byte integer. Why is the minimum value -32768? Isn't the highest binary bit a sign bit?
According to the mechanical complement rule, the representation range of 16-bit twos complement is -32767~+32767, in which there are two zeros, namely -0 and +0. But in practical application, 0 does not need to be signed, so -0 is artificially defined as -32768.