Signed two's-complement representation (8-bit): In an 8-bit signed two's-complement system, which bit pattern correctly represents the decimal value −128?

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:

  • Word width is exactly 8 bits.
  • Signed integers use standard two's-complement rules.
  • The value in question is −128, which is the most negative value in 8-bit two's-complement.


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:

Establish range for 8-bit two's-complement: −128 to +127.Identify that −128 equals −2^7.The canonical encoding of −2^(N−1) is a 1 in the MSB and 0 in all lower bits.Thus the correct pattern is 1000 0000.


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

More Questions from Number Systems and Codes

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion