Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Where is the decimal point convention for fixed-point integers?
Where is the decimal point convention for fixed-point integers?
Generally, the position of decimal point is fixed after the lowest bit of data.

Fixed decimal point: generally, the position of decimal point is fixed before the highest digit of data. Fixed-point integer: generally, the position of decimal point is fixed after the lowest bit of data. Fixed-point integer (pure integer): the decimal point is implicitly fixed after the lowest data bit, and the highest bit is used to represent the sign bit.

Definition of fixed-point integer

Fixed-point integer means that the position of decimal point in a number is fixed, usually there are fixed-point integer and fixed-point decimal. In C language, integers can be regarded as fixed points, and decimals are only floating-point or double-precision types.

All belong to floating-point type, that is to say, the fixed point of C language is integer type. Fixed-point integer. By default, the decimal point is after the lowest bit of binary number.

It is represented in binary form in the computer. Numbers are divided into signed numbers and unsigned numbers. The original code, complement and complement are all representations of signed fixed points.

The highest bit of a signed fixed point number is the sign bit, 0 is positive, and 1 is negative. Take an 8-bit integer as an example. The original code is the binary form of the number itself.