Difficulty: Easy
Correct Answer: 1000 0000
Explanation:
Introduction / Context:
Two's-complement is the dominant method for representing signed integers in digital systems because addition and subtraction use the same binary adder hardware for both positive and negative numbers. This question asks which 8-bit pattern encodes the decimal value −128 in two's-complement representation.
Given Data / Assumptions:
Concept / Approach:
For an N-bit two's-complement integer, the representable range is −2^(N−1) to +2^(N−1) − 1. With N = 8, the range is −128 to +127. The most negative value −128 has a unique representation because there is no positive counterpart of the same magnitude within the range. In two's-complement, −128 is represented by setting only the most significant bit (MSB) to 1 and all other bits to 0, i.e., 1000 0000.
Step-by-Step Solution:
Verification / Alternative check:
Consider the definition method: to negate a value X, two's-complement uses ~X + 1. The positive counterpart +128 cannot be represented in 8 bits (it would need 1000 0000 as an unsigned value), which is why 1000 0000 is reserved to represent −128 only. Arithmetic and overflow rules are consistent with this reservation.
Why Other Options Are Wrong:
1111 1110 equals −2 (since it is ~0000 0001 + 1). 0111 1111 equals +127. 1111 1111 equals −1. None of these are −128.
Common Pitfalls:
Assuming symmetry and expecting a +128 value; forgetting that the negative range has one extra magnitude. Confusing sign-magnitude or one's-complement with two's-complement encodings.
Final Answer:
1000 0000
Discussion & Comments