◀
Previous
Slide 10.8: Floating-point comparison and denormalized numbers
Slide 10.10: Floating-point addition
Home
Print version
▶
Next
FP Addition and Subtraction Algorithm
The following figure shows the algorithm for binary floating-point addition and subtraction. It includes the following five steps:
Step 1. Making exponents of two operands equal
Step 2. Adding or subtracting the significands
Step 3. Normalizing the result
Step 4. Rounding the significand
Step 5. Checking for overflow or underflow
The subtraction uses the addition hardware by converting the subtrahend to 2’s complement representation.
If rounding causes the result to be unnormalized, we must repeat Step 3.
For single precision, the maximum exponent is 127, and minimum exponent is -126. The limits for double precision are 1023 and -1022.
◀
Previous
Slide 10.8: Floating-point comparison and denormalized numbers
Slide 10.10: Floating-point addition
Home
Print version
▶
Next
The boxer is ready to
call time (end)
on his long career.