This number is like a floating decimal point, which is what we call scientific notation in mathematics.
It consists of an exponent code and a tail code, which are the significant figures and exponents in scientific notation. It is similar to 1.0*10^9, so the number is 1 billion. We only record 1 The two key numbers 1 and 9 can represent 1 billion, and they only take up 2 numbers in a small space. If written as an ordinary number, it is 100000000, so you need to record 1 1 and 9 0, which takes up a lot of space. This kind of number The decimal point does not float, so it is called a fixed-point number rather than a floating-point number. All numbers from the decimal point forward and backward need to be recorded. The space occupied has nothing to do with the number of significant digits, but is related to the number of digits. It will take up more space. Floating-point numbers are more economical. In space, it is also very good to use floating point numbers to represent decimals. Therefore, decimals in computers and numbers with relatively high digits are all made of floating point numbers. You cannot use int type just because 1 billion + 2 billion.
Floating point numbers are scientific notation. The difference is that in computers, they are binary floating point numbers. Our numbers of type 1.3e-10 are decimal floating point numbers.
1. Signed integer type In C language, a signed integer variable a is represented by signed int a. Usually the int a we write defaults to a signed integer type.
Depending on the program compiler, the number of bytes defined by the integer is different. Commonly used microcontroller compilers, such as KEIL, in the C language of the 51 type microcontroller, int represents 2 bytes (16 bits); in the C language of a 32-bit ARM processor, int represents 4 bytes (32 bits) . Many PC software compilers will define int as 8 byte (64-bit) according to the operating system or processor (such as 64-bit XP), and (such as 32-bit XP) will define int as 4 byte (32-bit) .
2. Unsigned integer
In C language, the unsigned integer variable b is represented by unsigned int b.
In the 32-bit XP system, for the unsigned integer variable b, signed short ?int b, b is 16 bits.
3. Character type
In C language, character c is represented by char c. Char is unsigned in the standard. The compiler can be implemented as signed or as Without symbols.
The range of char under VC6.0 and Linux is as follows
char a=127;
a=a+1; ?/*Now a The value is -128*/
unsigned char b=255;
b+=1; /*The value of b is now 0*/
4. Float Point type
Floating point type includes single floating point type float and double floating point type double. Floating point data are all signed types.