4.1 The representation
The representation of a number using the floating point method has three components:
- The mantissa.is a number n ∈ [1…2), which means it is at least 1, and less than 2.
- Note that the first part of a mantissa is implied. In other words, the 1. portion is implied. This means a
mantissa 1.011012 is represented as the bit pattern 011012.
- The sign s indicates whether a number is negative or not. It is conventional to use a value of 1 to indicate a negative
value, and 0 to indicate a non-negative value.
- The exponent x specifies the magnitude 2x−b, where b is an offset. so that x can be an unsigned number.
The value represented by such a floating number is, then, s = 0 ⇒ v = n2x−b,s = 1 ⇒ v = −n2x−b. Of course, we
immediately have a problem: how do we represent 0? Let’s defer this topic for now.