in Programming and DS recategorized by
1,320 views
2 votes
2 votes

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

  1. $2^{16} – 1$
  2. $2^{15} – 1$
  3. $2^{16}$ 
  4. $2^{15}$
in Programming and DS recategorized by
1.3k views

2 Answers

1 vote
1 vote
Best answer

A. 216-1.

2 bytes=16 bits therefore 2^16 possible values 
But since values start from 0,there's one less value for positive numbers. So -1

selected by
0 votes
0 votes

Ans: A 2 bytes= 16 bits

so, 0 to (2^16)-1