Computer Arithmetic

When two fixed-point numbers with 8 fraction bits are multiplied using an integer multiplier, how should the result be handled?

  1. AThe result is already in the 8-fraction-bit format, so nothing needs to be done
  2. BThe result has 4 fraction bits, so shift it left by 4
  3. CThe result has 16 fraction bits, so shift it right by 8 to return to the original format
Show answer and explanation

Answer: C. The result has 16 fraction bits, so shift it right by 8 to return to the original format

A number with 8 fraction bits is stored as an integer equal to the real value times 2⁸. Multiplying two gives a value scaled by 2⁸ × 2⁸ = 2¹⁶, so the result has 16 fraction bits. Returning to the 8-fraction-bit format means dividing by 2⁸, that is, shifting right by 8 and rounding if needed. Products have more bits, so intermediate results are normally kept in a wider format. Addition leaves the fraction width unchanged, but multiplication adds the widths.

  • A. Multiplication adds the fraction widths, so the format changes.
  • B. The fraction does not shrink; it becomes 8 + 8 = 16 bits.
  • C. Correct. With 16 fraction bits, shift right by 8 to restore the format.
Practice this topic Back to topic

More Computer Arithmetic questions

  1. Which describes saturating arithmetic used in signal processing?
  2. In a carry-lookahead adder, which gives the definitions of each bit's generate signal g and propagate signal p (a and b are that bit's inputs) and the carry into the next bit, c(i+1)?
  3. Why are carry-save adders used to sum the many partial products in a multiplier?
  4. Which describes a Wallace tree used in fast multipliers?
  5. What is the main effect of using radix-4 Booth's algorithm (Booth encoding) in a multiplier?