What range of integers can be represented in n-bit two’s complement form?
Correct answer A. -2^(n-1) to 2^(n-1) - 1
Explanation
Two's complement has a single representation of zero, so one extra code is available for negatives: 8 bits give -128 to +127. The symmetric range -(2^(n-1) - 1) to 2^(n-1) - 1 belongs to sign-magnitude and one's complement, which waste a code on negative zero. The range 0 to 2^n - 1 is for unsigned numbers.
Answer checked How we write and check questions
Discussion