Representation and Multiplication

Recall how Floating Point Numbers are represented.

  • Precision
  • Exponent width
  • Base
  • Hidden bit for

Let .

Then

For ,

Multiplication Algorithm

Multiple significands (including the hidden bit). We need to multiply unsigned integers. Add exponents (handling bias). Determine sign bit, easy logic block. If product is 0, adjust representation.

Normalize product

  • Significand too big: shift right, increase exponent
  • Significand too small: shift left, decrease exponent

If exponent over or under-flows, generate exception.

Round to appropriate number of bits

  • May need renormalization

Rounding and Normalization

Three pieces of data enough to produce the correctly rounded value:

  • Rounding digit
  • Sticky digit , anything that happens after rounding error point.
  • Guard digit

Example

(Note: this was generated with NotebookLM using my notes, may be prone to error)

Let’s walk through an example of floating-point multiplication using a shift-and-add multiplier with a 7-bit mantissa (including the hidden bit). We’ll focus on the significand multiplication, normalization, and rounding steps.

Assume we are multiplying two normalized floating-point numbers:

Here, the significands are and . For simplicity, we will perform unsigned multiplication.

1. Multiply Significands (7-bit x 7-bit unsigned multiplication)

We are multiplying and (binary), which are the bit representations of the significands without the binary point. We will use the shift-and-add method:

StepMultiplier BitAccumulatorOperation
000000000000000Initialize
1000000000000000Shift
2000000000000000Shift
3100010110100000Add, Shift
4000010110100000Shift
5101000100100000Add, Shift
6110010110100000Add, Shift

The result of the multiplication is .

2. Normalization

The binary point is assumed to be after the first bit of the significand (hidden bit). So we rewrite the result as . Since the number is greater than 2, we shift right and increase the exponent:

Now we have a normalized form.

3. Rounding

We need to round to 6 bits after the hidden bit (since the hidden bit is not explicitly stored). So we need to truncate or round to . We consider the guard (), round (), and sticky () bits.

  • Our number is
  • Rounding digit () is 1
  • Guard digit () is 1
  • Sticky digit () is 0 (since there are no more non-zero digits)

Using round-to-nearest, since the round bit is 1, we round up.

4. Final Result

The final significand after multiplication, normalization, and rounding is . The complete result would be:

, where:

  • determines the sign of the result.
  • is the biased exponent, with “+1” resulting from the normalization shift.

This example illustrates the basic steps involved in floating-point multiplication using a shift-and-add multiplier.

Floating Point Multiplier Design

Input:

Outputs:

Shift and Add Multiplier

When the state machine is at state ST’/0, all outputs are 0, and the machine is waiting for start signal.