In: Computer Science
Explain the use of the mantissa and exponent for its representation on a computer. Why is it necessary?
Explain the terms “normalization”, “hidden bit” and “bias” in the context of floating point number representation.
In order to represent and store very large or small numbers in their actual form in a computer, we would need more more bytes of memory. However, if a number is represented using mantissa and exponent, we can reduce the number of bytes required to store the same number. Hence, it is necessary to store a number using mantissa and exponent.
Normalization means putting in scientific notation. Since a mantissa can never start with 0 and never be less than the base, this means that we can normalize the mantissa to start with 1 and put all other digits after the decimal point.
Since the normalized mantissa always starts with 1, we don't meed to store it. The first bit is called the hidden bit because it always exits, but we never store it.
Biasing the technique which is done because exponents have to be signed values in order to be able to represent both tiny and huge values, but two's complement, the usual representation for signed values, would make comparison harder.