Single Precision Floating Point Binary addition/subtraction Process:
- Step #1: Extract sign bits SignA and SignB
- Step #2: Extract mantissa bits MantA and MantB
- Step #3:
- Extract exponent ExpA and ExpB
- Find the absolute difference ExpDiff = |ExpA - ExpB|
- Select Exponent of greater number
- Step #4: Shift mantissa of number with smaller exponent towards right
- Step #5: Do add/sub operation on mantissa considering the hidden bit
- Step #6: Normalizing the output
- Operation = add
- carryOut = 1 then
- result = result >> 1
- exponent = exponent + 1;
- result = result >> 1
- carryOut = 1 then
- Operation = sub
- check for leading zeros
- left shift result till first 1 is obtained
- exponent = exponent - number of leading zeros
- left shift result till first 1 is obtained
- check for leading zeros
- Operation = add