Difficulty: Easy
Correct Answer: –12810 to +12710
Explanation:
Introduction / Context:
Understanding the representable range of two's-complement integers is fundamental for overflow checks, embedded systems programming, and digital arithmetic design.
Given Data / Assumptions:
Concept / Approach:
The two's-complement range is: minimum = −2^(n−1), maximum = +2^(n−1) − 1. This asymmetry arises because there is only one representation for zero, leaving an extra negative value.
Step-by-Step Solution:
Compute min: −2^(8−1) = −2^7 = −128.Compute max: +2^(8−1) − 1 = +2^7 − 1 = +127.Therefore, range is −128 to +127 (base 10).
Verification / Alternative check:
List extreme bit patterns: 10000000₂ = −128; 01111111₂ = +127, confirming the range.
Why Other Options Are Wrong:
Options showing +128 as representable are incorrect in two's complement; +128 requires 9 bits.
Common Pitfalls:
Confusing sign-magnitude with two's complement or assuming symmetry about zero.
Final Answer:
–12810 to +12710
Discussion & Comments