Unformatted text preview: y to determine the number of shifts. There are some steps that cannot be shared
between the two algorithms (for example, the mantissas must be subtracted versus divided),
but both algorithms share the normalization step.
So, in summary, shared steps are as follows:
• Subtract exponents (remember, result of this subtraction is used differently in the
two algorithms, which must be accounted for)
• Normalize mantissa
Steps that cannot be combined completely are:
• Must re-add bias to result of exponent subtraction for division
• Subtract or divide mantissas based on which operation is being performed • Sign bit must be set differently (in division, the sign is set to positive if signs of
divisor and dividend are equal; negative otherwise). All that is left for the student to do is put these steps in order on a flow chart and combine
steps when possible in order to generate a single algorithm....
View Full Document
- Fall '08
- Subtraction, set sign bit