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?
- A. 33
- B. 31
- C. 32
- 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.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A loop computes y[i] += A[i][j] × x[j] for a 32×32 matrix of 4-byte floats (A in row-major order at address 0, x at 4096, y at 4224); for…
- A direct-mapped cache has a 1-cycle hit time, a 4% miss rate and a 40-cycle miss penalty on a 1.0 ns clock. A 2-way version also hits in 1…
- An interrupt is recognised only at instruction boundaries. The longest instruction takes 30 cycles; on average an interrupt arrives…
- A program has base CPI 1.2 and makes 1.4 memory references per instruction. Per memory reference, 3% miss in L1 and 1.2% miss in L2 (a…
- Design 1 is a direct-mapped cache (hit 1.0 ns, miss rate 6%) with a victim buffer that catches 25% of its misses for 1 ns extra; the other…
- A cache with 8-word blocks is cold. A program reads an array of 1000 consecutive words once, starting at a block boundary. How many…