GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A 16-bit unsigned integer (0..65535) is multiplied by a 16-bit two's-complement integer (−32768..32767). What is the minimum width of a two's-complement register that can hold every possible product exactly?

  1. A. 33
  2. B. 31
  3. C. 32
  4. D. 17

Correct answer: C. 32

Extremes: 65535 × 32767 = 2,147,385,345 ≤ 2³¹ − 1 and 65535 × (−32768) = −2,147,450,880 ≥ −2³¹. Both fit in 32 bits, and 31 bits (max 2³⁰ − 1) cannot hold them. Treating the unsigned operand as a 17-bit signed number suggests 33 bits, but the actual range fits in 32.

More Computer Organization and Architecture questions

Exams that ask this topic