Page 79 - Engineering Digital Design
P. 79

50              CHAPTER 2 / NUMBER SYSTEMS, BINARY ARITHMETIC, AND CODES


                    can be represented many different ways in floating-point notation:


                                                                     33
                                        Planck's constant, h = 0.6625 x 10~
                                                                      32
                                                        = 0.06625 x 10~
                                                                       31
                                                        = 0.006625 x 10" .

                    All three adhere to the form of Eq. (2.17) and are, therefore, legitimate floating-point
                    numbers in radix 10. Thus, as the radix point floats to the left, the exponent is scaled
                    accordingly. The first form for h is said to be normalized because the most significant digit
                    (MSD) of M is nonzero, a means of standardizing the radix point position. Notice that the
                    sign for M is positive while that for E is negative.
                      In computers the FPN is represented in binary where the normalized representation
                    requires that the MSB for M always be 1. Thus, the range in M in decimal is

                                                  0.5 < M < 1.

                    Also, the fraction (mantissa) M is represented in sign-magnitude from. The normalized
                    format for a 32-bit floating-point number in binary, which agrees with the IEEE standard
                    [3], is shown in Fig. 2.1. Here, the sign bit (1 if negative or 0 if positive) is placed at bit
                    position 0 to indicate the sign of the fraction. Notice that the radix point is assumed to lie
                    between bit positions 8 and 9 to separate the E bit-field from the M bit-field.
                      Before two FPNs can be added or subtracted in a computer, the E fields must be compared
                    and equalized, and the M fields adjusted. The decision-making process can be simplified
                    if all exponents are converted to positive numbers by using the excess representation given
                    by Eq. (2.16). For a #-digit number in radix r, the exponent in Eq. (2.17) becomes

                                                           (i
                                                              l
                                                 E xs = E r+r ~ ,                      (2.18)
                                                                      q
                    where E is the actual exponent augmented by a bias of B = r ^. The range in the actual
                    exponent E r is usually taken to be
                                             q l
                                          -(r ~  - 1) < E r < +(/•*-' - 1).







                            Sign    Exponent E                Fraction F
                            Bit  (radix 2, bias 127)          (Mantissa)
                                           Assumed
                                           position of
                                           radix point
                    FIGURE 2.1
                    IEEE standard bit format for 32-bit normalized floating-point representation.
   74   75   76   77   78   79   80   81   82   83   84