Skip to main content

Arithmetic pipeline with example

Short answer

Arithmetic pipeline divides an operation like floating-point addition into segments (compare exponents, align mantissas, add, normalise). Example: X=0.9504×10³ and Y=0.8200×10²; after alignment to 0.0820×10³, sum 1.0324×10³ normalises to 0.10324×10⁴. n additions take k+n-1 clocks.

Explain arithmetic pipeline with an example.

An arithmetic pipeline divides an arithmetic operation (such as floating-point addition or multiplication) into sub-operations, with each one done in its own segment. Different pairs of numbers are in different segments at the same time, so after the first result a new result comes out every clock cycle. It is used in high-speed floating-point units and vector processors.

Example: floating-point addition pipeline (4 segments)

Segments, with registers R between them:

  1. Compare the exponents
  2. Align the mantissas (shift the smaller number)
  3. Add or subtract the mantissas
  4. Normalise the result (and adjust the exponent)
 Exponents a,b        Mantissas A,B
     |                    |
 [Compare exponents]------+   R
     v                    v
 [Choose exponent, align mantissa]   R
                  v
         [Add/subtract mantissas]    R
                  v
       [Normalise, adjust exponent]  R
                  v
                result

Numerical example: X = 0.9504 × 10³ and Y = 0.8200 × 10².

  1. Exponents: 3 and 2, difference = 1, so the larger exponent 3 is chosen.
  2. Align: Y = 0.0820 × 10³.
  3. Add: 0.9504 + 0.0820 = 1.0324 × 10³.
  4. Normalise: 0.10324 × 10⁴.

Result Z = 0.10324 × 10⁴ (= 1032.4). Check: 950.4 + 82.0 = 1032.4.

With 4 segments of equal time, n additions take (4 + n - 1) clocks instead of 4n.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 4 questions →