In two's complement, -1 is obtained by inverting all bits of +1 and then adding 1. For 8 bits, +1 is 00000001. Inverting gives 11111110, and adding 1 yields 11111111. Thus, the pattern 11111111 represents -1 in any fixed-width two's complement system, including 8 bits.
Option A:
Option A, 00000001, is the representation of +1, not -1. In unsigned binary and two's complement, this pattern always denotes a positive value. Therefore, it cannot be used for -1 in 8-bit two's complement.
Option B:
Option B, 10000000, represents the most negative value in 8-bit two's complement. Specifically, it corresponds to -128, derived from -2^(n-1). Because -128 is far from -1, this pattern is not correct for the given decimal number.
Option C:
Option C, 01111111, corresponds to the largest positive value, which is +127 in 8-bit two's complement. All leading bits except the sign bit are 1, making it a high positive integer. Thus, it cannot represent -1.
Option D:
Option D, 11111111, results directly from taking the two's complement of 00000001. It encodes -1 consistently in 8-bit signed arithmetic. This is why all bits set to 1 in two's complement signify -1, making this option correct.
Comment Your Answer
Please login to comment your answer.
Sign In
Sign Up
Answers commented by others
No answers commented yet. Be the first to comment!