This algorithm multiplies

IEEE 754 style,

normalized

floating point numbers. This means it is a number of the following kind:

(-1)^(

sign) * (1 +

mantissa) * 2^ (

exponent - 127)

The exponent is saved +127 (for

single precision) or +1023 (for

double precision), this is called

biased).

The both biased exponents are added and 127 is substracted, because if 127 is not substracted, the number would be "double biased" and would create an overflow. The both significants (which are the mantissa + 1) are multiplied using a normal binary multiplication algorithm like Booth's Algorithm. Usually the result will not be normalized. So the signifcant has to be shifted left or right (and the exponent into the other direction) until the significant is 1.x...x in binary or y.x...x (where 0 < y < 10) in decimal mode. You also have to test if an overflow or underflow occured. Now you have to round the significant (for operations there are two additional LSBs kept). Sometimes it may occur, that the rounded number is not normalized, then you have to normalize it again.

**Sources:**

Computer Organization & Design: The Hardware / Software Interface, David A. Patterson and John L. Hennessy, Morgan Kaufmann Publishers, San Francisco, California

Technische Grundlagen der Informatik II: Script, Prof. Dr. Michael Gössel, University of Potsdam

Spim Tutorial: Einführung in die Assemblerprogrammierung mit MIPS, Reinhard Nitzsche, avaiable online

Grundlagen der Digitaltechnik, Prof. Dr.-Ing. Dr.-Ing h.c. Dr. h.c. Hans Martin Lipp, Oldenbourg Verlag, München and Wien

Technische Informatik I, Wolfram Schiffmann and Peter Schmitz, Springer Lehrbuch, Berlin

Spim Documentation, avaiable at http://www.cs.wisc.edu/~larus/spim.html