GATE Computer ScienceModerateGATE CS (PYQ pattern)
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 order. What is the minimum accumulator width that can never overflow, whatever the values and order?
- A. 16
- B. 18
- C. 17
- D. 15
Correct answer: C. 17
Every partial sum lies between the extreme totals, which are -12800 (all signed values −128, unsigned 0) and 100·127 + 100·255 = 38200. 16 bits reach only 32767, so 17 bits (−65536..65535) are needed. Treating all 200 values as signed bytes would suggest 16 bits; 100 signed values alone need 15.
More Digital Logic questions
- 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…
- The partial products of an 8 × 8 unsigned multiplier (one AND gate per bit pair) are reduced by a Dadda tree, whose stage height limits…