Integers are represented in the form of complement at the bottom of the computer. Except for the first sign bit, the remaining numbers represent the range of values. Floating-point number is a real number in a computer. It approximately represents any real number by multiplying an integer or a fixed number (mantissa) by the integer power of a radix (usually 2 in a computer).
Extended data:
The overflow of floating-point numbers is manifested as the overflow of their rank codes. If the rank code is normal, the addition (subtraction) operation ends normally; If the grade code overflows, it should be handled accordingly. In addition, mantissa overflow also needs to be dealt with.
Sequence code overflow exceeds the positive exponent value of the maximum value that sequence code can represent, which is generally considered as +∞ and -∞. The order code underflow exceeds the negative exponential value of the minimum value that the order code may represent, which is generally considered as 0.
Mantissa overflow Two mantissas of the same sign are added to produce the carry in the highest bit direction. Move the mantissa to the right and increase the order code by 1 to realign. Mantissa underflow When mantissa moves to the right, mantissa least significant bit flows out from the right end of mantissa field and needs to be rounded.