Page 94 - Engineering Digital Design
P. 94

2.9 BINARY ARITHMETIC                                                 65


                    In FPN notation the addition operation becomes
                                             S      E             M
                               145.500 ->    0 10000111 100100011000-•-00
                              +27.625 -» +0      10000111 000110111010-•-00 ,
                              173.125        0   10000111 101011010010-•-00

                 where the exponents given in excess 127 form are 127 + 8 = 135 as discussed in Section 2.7.
                 To represent the result in normalized FPN notation, the most significant 1 bit of the mantissa
                 is omitted, yielding the result 0 10000111 010110100100 ••• 00 for the sign, exponent, and
                 mantissa fields, respectively.

                 EXAMPLE 2.35 — Subtraction in 2's complement
                                               S      E             M
                               -145.500 ->     0 10000111 011011101000-•-00
                                +27.625 -> +0     10000111 000110111010-•-00
                               -117.875        0  10000111 100010100010-•-00

                 The true value is obtained by negation of the mantissa (taking its 2's complement), giv-
                 ing the sign magnitude result 1 10000111 011101011110- • -00, which is -117.8751 0. In
                 normalized FPN notation the MSB 1 bit of the mantissa would be omitted, giving the 2's
                 complement result 1 10000111 00010100010 ••• 00.

                 FPN Multiplication and Division In some respects multiplication and division of FPNs
                 is simpler than addition and subtraction from the point of view of the decision-making
                 problem. Multiplication and division operations can be carried out by using the standard
                 methods for such operations without the need to compare and equalize the exponents of
                 the operands. The following generalizations of these processes illustrates the procedure
                 involved.
                    The product of two operands X and Y in radix r is represented as follows:


                                          P = X x Y
                                                   Ex
                                           = (M X -r ) x (M Y -r  Ey  )
                                           = (M X x M Y)-r (Ex+Ey}
                                                   Ep
                                           = M P -r ,

                 where the exponents are added following Algorithm 2.8 while the mantissas are multiplied
                 by using Algorithm 2.10. The addition and multiplication of signed numbers is covered by
                 Algorithms 2.9 and 2.11, respectively.
                    Similarly, for division in radix r the quotient is given by
   89   90   91   92   93   94   95   96   97   98   99