Floating-point type is to add the following decimal parts and discard the rest.
Constant has a range of values. Cannot exceed the minimum to maximum range of integers, otherwise it will overflow.
For unsigned numbers, it can be calculated directly according to the number of digits occupied:
Unsigned short integer 16 bits 0 ~ 2 16- 1 (i.e. 65535)
Unsigned integer 16 bits 0 ~ 2 16- 1 (i.e. 65535)
Unsigned long type 32-bit 0 ~ 2 32- 1 (i.e. 4294967295)
For signed numbers, because 0 also occupies a position, the boundary value of negative numbers is different from that of positive numbers:
Short 16 bit 2 (16-1) ~ 2 (16-1) power-1(that is, -32768~32767).
Int16bit2 (16-1) ~ 2 (16-1) power-1(i.e. -32768~32767).
The length of 32 bits is 2 (32-1) ~ 2 (32- 1) power-1 (that is,-2147483648 ~ 2147483647).