GATE Computer ScienceModerateGATE CS (PYQ pattern)

What is the minimum two's complement width that can hold every exact product of (i) two 12-bit two's complement integers, and (ii) a 12-bit two's complement integer times a 12-bit unsigned integer?

  1. A. 23 and 24
  2. B. 24 and 25
  3. C. 24 and 24
  4. D. 23 and 25

Correct answer: C. 24 and 24

(i) The range is −2048 × 2047 = −4,192,256 to (−2048)² = 4,194,304 = 2²². 23 bits stop at 2²² − 1, so the single case (−2048)² forces 24 bits. (ii) −2048 × 4095 = −8,386,560 to 2047 × 4095 = 8,382,465; both fit in 24 bits (±2²³ = 8,388,608), so 24. Adding widths blindly (12 + 13 = 25 for the unsigned operand as a 13-bit signed number) overestimates.

More Digital Logic questions

Exams that ask this topic