edited by
277 views
6 votes
6 votes

Which of the following is the correct way to represent a signed decimal number in $2's$ complement representation as a sum of powers of 2?

  1. $(b_{n-1} b_{n-2} \ldots b_2 b_1 b_0)_2 \equiv\sum_{i=0}^{n-1} b_i 2^i$
  2. $(b_{n-1} b_{n-2} \ldots b_2 b_1 b_0)_2 \equiv-b_{n-1}2^{n-1}+\sum_{i=0}^{n-2} b_i 2^i.$
  3. $(b_{n-1} b_{n-2} \ldots b_2 b_1 b_0)_2 \equiv-b_{n-1}2^{n-1}+\sum_{i=0}^{n-1} b_i 2^i.$
  4. $(b_{n-1} b_{n-2} \ldots b_2 b_1 b_0)_2 \equiv-b_{n-1}2^{n}+\sum_{i=0}^{n-2} b_i 2^i.$
edited by

1 Answer

Best answer
6 votes
6 votes
Option (B).

$(b_{n-1} b_{n-2} \ldots b_2 b_1 b_0)_2 \equiv-b_{n-1}2^{n-1}+\sum_{i=0}^{n-2} b_i 2^i$ is correct.
    
    Say, for $n=8,$
    
    $(10000000)_2=-128=-2^7$
    
    $(10000001)_2=-127=-2^7+2^0$
    
    $(10000010)_2=-126=-2^7+2^1$
    
    i.e., $1$ in the highest order bit makes the number negative and the other bits add positive values to the number. So, the minimum value represented $ = -2^{n-1}$ (MSB is $1$ and all other bits are $0s)$ and maximum value represented $ = 2^{n-1} - 1$ (MSB is $0$ and all other bits are $1s).$
selected by
Answer:

Related questions

7 votes
7 votes
1 answer
1
gatecse asked Jul 19, 2020
581 views
Which of the following decimal number does not cause a loss of precision when represented in IEEE-754 single precision representation?$4096 \times 4096 \times 4096$$24824...
6 votes
6 votes
1 answer
2
gatecse asked Jul 19, 2020
320 views
Which of the following $32-bit$ bits stream correctly represents the maximum possible normalized value represented in IEEE-754 single-precision representation?$\underbrac...