Solution
The correct answer is -128, 0
Key Points
The least values of a signed and unsigned 8-bit data type variables are:
- -128 for a signed variable
- 0 for an unsigned variable
Explanation:
- Signed variables: With 8 bits, a signed variable can represent both positive and negative numbers. The leftmost bit is used for the sign (0 for positive, 1 for negative). Leaving 7 bits for the value, it can range from -2^(7-1) (which is -128) to 2^(7-1) - 1 (which is 127).
- Unsigned variables: Since unsigned variables only represent non-negative numbers, all 8 bits are available for the value. This allows it to range from 0 (all bits 0) to 2^8 - 1 (which is 255).