A 8-bit signed integer has the following range ?
A. 0 to 255
B. -128 to 127
C. -255 to 254
D. 0 to 509
Answer : B. -128 to 127
Explanation :
- There are 28 (256) different possible values for 8 bits.
- When unsigned integer, it has possible values ranging from 0 to 255.
- When signed integer, it has -128 to 127