4.3.1 Multiplication

Multiplication for floating point numbers is actually the simplest operation! It is almost the same as the multiplication of two fixed point numbers, where the implied binary point is between bit 22 and bit 23. Recall that bit 23 is the implied 1. of the mantissa.

Let us assume that we are computing a b. as, ae and am represent the sign bit, the exponent value (not the raw bit pattern) and the mantissa value (not the raw bit pattern) of a, respectively. Similar symbols are defined for b and the product term p.

Then, the absolute value of the product is am bm 2ae+be. The sign follows this rule: ps = as bs.

Of course, things are not quite as simple as they seem. First of all, the multiplication of the mantissas is a 24 × 24 multiplication, which yields a 48-bit result. Each operand is a 24-bit number because there are 23 represented mantissa digits, plus one implied 1. on the left hand side.

Let pmrepresent the raw bit pattern 48-bit product. We need to round this value because only 24 of these 48 bits can be represented in the product’s mantissa. The rounding is done by adding 1 to the 48-bit raw product pattern.

Next, the raw product bit pattern needs to be right shifted 23 + 23 = 46 times to represent the actual value pm. Note that the value of digits on the left hand side of the binary point can range from 012 to 112. This means we may need to normalize the product.