Discussion
If an integer needs two bytes of storage, then the maximum value of a signed integer is
Answer: B
The maximum signed integer in two bytes is \(2^{15} - 1\).
Two bytes are 16 bits. In two's complement the top bit is the sign, which leaves 15 bits for the value:
\[ \text{max} = 2^{15} - 1 = 32767 \]
\(2^{16} - 1\) is 65535, the largest unsigned value in two bytes. \(2^{16}\) and \(2^{15}\) are one more than the largest unsigned and signed values, so no 16-bit integer can reach them.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development