in Digital Logic
5,201 views
6 votes
6 votes

If an integer needs two bytes of storage, then the maximum value of signed integer is

  1. $2^{16}-1$
  2. $2^{15}-1$
  3. $2^{16}$
  4. $2^{15}$
in Digital Logic
5.2k views

2 Answers

12 votes
12 votes
Best answer
In case of signed Magnitude Representation the range is from  $-(2^{n-1}-1)$ to $2^{n-1}-1$

Min number that can be represented in this system is $-(2^{n-1}-1)$

The max number that can be represented in this system is  $2^{n-1}-1$

In the case of 2's complement no system, the range is from $-(2^{n-1})$ to $2^{n-1}-1$

Min no that can be represented in this system is $-(2^{n-1})$

Max no that can be represented in this system is $2^{n-1}-1$

As they said 2 Bytes = 16 bits

we can use max no that can be represented here  which is $2^{n-1}-1\implies 2^{16-1}-1=2^{15}-1$
edited by
1 vote
1 vote

Option(B)215-1

Answer: