0
4.7kviews
Explain the steps to be followed for the addition of floating point numbers

Subject: Computer Organization

Topic: Introduction to Computer Organization

Difficulty: Medium

1 Answer
0
503views

Steps for floating point addition of two numbers

Consider number A and B both are floating point number.

  1. Check whether A or B is zero if so the result is other operand.
  2. Calculate the difference between the exponents i.e. Ea-Eb or Eb-Ea.
  3. Select the number A or B which has a smallest exponent.
  4. Shift right the mantissa of the selected number by number of times equal to the difference between the exponents .Now both the numbers have same exponent.
  5. Perform addition of mantissa Ma+Mb.
  6. The sum is (Ma+Mb)×r exponent(Ec).
  7. Normalize the result this is done by shifting left the mantissa bit till the MSB bit is non-zero. For each left shift the exponent of the result has to be decreased by 1.
Please log in to add an answer.