If an integer needs two bytes of storage, then the maximum value of unsigned…
2011
If an integer needs two bytes of storage, then the maximum value of unsigned integer is
- A.
\(2^{16} - 1\)
- B.
\(2^{15} - 1\)
- C.
\(2^{16}\)
- D.
\(2^{15}\)
Attempted by 208 students.
Show answer & explanation
Correct answer: A
Since one byte consists of eight bits, two bytes provide a total storage capacity of exactly sixteen bits for data representation. For an unsigned integer utilizing n bits, the maximum representable value is mathematically calculated as two to the power of n minus one. Therefore, with sixteen bits available for storage in this scenario, the maximum value is 2¹⁶ − 1.
A video solution is available for this question — log in and enroll to watch it.
Loading lesson…