- Asked 3/22
- 2079 Baisakh · 6 marks
- 2074 Asoj · 4 marks
- 2069 Chaitra · 4 marks
Floating point multiplication
Short answer
Multiply mantissas, add exponents (e = ex + ey - bias). Sign = sx xor sy. Normalize product by shifting and adjust exponent. Example: 1.100×2² × 1.010×2¹ = 1.111×2³ = 15.
Explain the floating point multiplication algorithm with flowchart and example.
For X = mx × 2^ex and Y = my × 2^ey, the product is X × Y = (mx × my) × 2^(ex + ey). The mantissas are multiplied as fixed-point numbers and the exponents are added.
Algorithm
- Check for zero: if either operand is 0, the result is 0.
- Add the exponents: e = ex + ey. With biased exponents, subtract the bias once: e = ex + ey - bias.
- Sign of the result = sign(X) xor sign(Y).
- Multiply the mantissas (for example by Booth's algorithm or shift-and-add).
- Normalise the product (if the product mantissa is 10.xxx, shift right and add 1 to the exponent; if it has leading zeros, shift left and decrease the exponent).
- Round the mantissa and check for exponent overflow or underflow.
Start
|
X = 0 or Y = 0? --yes--> result 0
| no
e = ex + ey - bias ; sign = sx xor sy
|
Multiply mantissas
|
Normalise and round
|
Exponent overflow/underflow? --yes--> error
| no
Stop
Example
X = 1.100 × 2² (6) and Y = 1.010 × 2¹ (2.5).
- Exponent: 2 + 1 = 3.
- Mantissas: 1.100 × 1.010 = 1.5 × 1.25 = 1.875 = 1.111 (already normalised).
- Result = 1.111 × 2³ = 1.875 × 8 = 15. ✓ (6 × 2.5 = 15).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Floating point division algorithm · Computer Organization and Architecture, chapter 5 · asked 4×
- Floating point addition and subtraction · Computer Organization and Architecture, chapter 5 · asked 6×
- Booth multiplication algorithm and hardware · Computer Organization and Architecture, chapter 5 · asked 8×
- Non-restoring division with flowchart · Computer Organization and Architecture, chapter 5 · asked 3×
- Booth multiplication of -5 × -9 · Computer Organization and Architecture, chapter 5 · asked 5×
- Booth multiplication of 5 × -6 · Computer Organization and Architecture, chapter 5 · asked 5×
- Algorithm and flowchart for largest · Computer Programming, chapter 2
- Algorithm and flowchart: quadratic roots · Computer Programming, chapter 2
- Algorithm and flowchart: distance between points · Computer Programming, chapter 2
- Algorithm and flowchart help; Armstrong flowchart · Computer Programming, chapter 2
All Computer Organization and Architecture chapter 5 questions →