Arithmetic Pipelining divides an arithmetic problem into various sub problems for execution in various pipeline segments.
- It is used for floating point operations, multiplication and various other computations.
- The process or flowchart arithmetic pipeline for floating point addition is shown in the diagram.
Flowchart of Arithmetic pipelining for floating point addition and Subtraction:
The suboperations of Arithmetic pipeline for floating point addition and Subtraction involve 4 stages:
- Compare the exponents.
- Align the mantissas.
- Add or subtract the mantissas.
- Normalise the result
First of all the two exponents are compared and the larger of two exponents is chosen as the result exponent. The difference in the exponents then decides how many times we must shift the smaller exponent to the right. Then after shifting of exponent, both the mantissas get aligned. Finally the addition of both numbers take place followed by normalization of the result in the last segment.
Example:
Let us consider two numbers:-
Explanation: First of all the two exponents are subtracted to give 3-2=1. Thus 3 becomes the exponent of result and the smaller exponent is shifted 1 times to the right to give
Finally the two numbers are added to produce
As the result is already normalized the result remains the same.