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?
- A. 23 and 24
- B. 24 and 25
- C. 24 and 24
- 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
- A two's complement accumulator starts at 0 and adds 100 signed 8-bit values (−128 to 127) and 100 unsigned 8-bit values (0 to 255), in any…
- In 3-digit BCD arithmetic, 254 − 783 is computed by adding the 10's complement of 783 to 254 (with decimal correction in each digit). What…
- A 4-bit cyclic Gray code is a cyclic sequence through all sixteen 4-bit words in which consecutive words, including the last and the…
- F(A,B,C,D) = (A ⊕ B)(B ⊕ C) + (A ⊙ C)·B' + ABCD, where ⊙ is XNOR. What is the minimal sum-of-products of F?
- Which of the following identities hold for all A, B, C? I. A + (B ⊕ C) = (A + B) ⊕ (A + C) II. A·(B ⊕ C) = AB ⊕ AC III. A ⊕ (B + C) = (A ⊕…
- In IEEE 754 single precision with round-to-nearest, ties-to-even, what is the smallest positive single-precision number x for which the…