Fractional Number Representation (Floating Point). Fractional numbers can be represented in the form of regular fractions or in scientific notation.
Regular Fraction Form In the form of a regular fraction, the number is represented directly in its binary form. Example: 27.625 = 11011.101₂
Scientific Notation Form In scientific notation, a fractional number is expressed as ( X = \pm M \cdot B^{\pm E} ).
Where:
- ( M ) = mantissa
- ( B ) = base
- ( E ) = exponent
Problem: There are infinitely many possible representations. In the previous example,
[ \text{and so on.} ]
To address this, a normal form is defined, with the condition:
[ \text{(normal form condition)} ]
Thus, the normalized scientific form (meeting the requirement) of 5,700,000 is:
[ \text{(normalized form of 5,700,000)} ]
In this normal form, the mantissa always has the form '0,...' so that in its bit representation, the fraction '0,' can be omitted.
The mantissa and exponent can be represented using one of the signed integer representation methods discussed above. The representation method chosen may differ between the mantissa and the exponent.
Example
Using a 16-bit string to represent a fractional number:
- The first 10 bits are used to store the mantissa in S/M form.
- The remaining 6 bits are used to store the mantissa in 1's complement form.
- We will represent the number 0.00000075.