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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.