How to find the range?
Signed number is represented by complement in computer! The highest bit is the sign bit, 0 is a positive number, and 1 is a negative number! The complement of positive number is still in other provinces, and the way to find the complement of negative number is to write its corresponding positive number. For example, -32768 corresponds to 32768, and its binary is negated by 1, so the largest positive number is 0111165438. 1 1 1, that is, the decimal 0x7fff is the minimum value of the negative number of 32767, and the binary complement10000000000 is converted back to other bits, and minus one is 01/kloc-0. 38+01111after inversion, 1000000000000, then his value is 32768, so the corresponding negative number is -32768.
It is 32768 after conversion. Because the sign bit is 1, it is -32768.