At this time, there are two representations of 0, namely, positive 0 and negative 0: 000000000000 =100000000000 = 0. Therefore, when represented by binary code, the range of values is -32767~-0 and 0~32767. Because there are two zeros, the number of different values is 1.
But the computer uses two's complement to store data, that is, the positive code remains unchanged. From 000000000000000000 to 01111165438+. Negative numbers need to be added with 1 after the sign bit, that is, the complement of -32767 is10000000001.
In the complement system, the range is -23768~32767. So the smallest binary number is really111111165438. Only the minimum value of two's complement is1000000000,111111.
Extended data
Double precision size and value range in C language
Number of bytes occupied:
printf(" float:bytes % d; Bit %d\n ",sizeof(float), sizeof (float) * 8);
double:bytes 8; 64 bit
Value range: According to the C standard, the double type can represent at least 10 significant digits. Some systems use all the extra 32 bits to represent mantissa, which means that there are at least 13 significant digits, which exceeds the minimum standard specified by C.