Computer Arithmetic
When two unsigned 8-bit numbers are multiplied, how many bits are needed to represent the result without overflow?
- A8 bits
- B9 bits
- C16 bits
Show answer and explanation
Answer: C. 16 bits
The largest unsigned 8-bit value is 255, so the largest product is 255 × 255 = 65025. That is less than 2¹⁶ = 65536 but greater than 2¹⁵ = 32768, so 16 bits always suffice while 15 do not. In general, the product of n-bit and m-bit numbers fits in n + m bits, which is why multiplier outputs are normally twice the input width. Nine bits is the width needed for a sum (n + 1 bits).
- A. Eight bits reach only 255, so the product overflows.
- B. Nine bits is the width needed for a sum.
- C. Correct. The largest product, 65025, fits in 16 bits.