Two’s-complement edge case: Find the 2’s complement of the 4-bit binary number 1000, assuming fixed 4-bit arithmetic.

Difficulty: Easy

Correct Answer: 1000

Explanation:


Introduction / Context:
Two’s-complement arithmetic is the dominant scheme for signed integers in digital systems. An important corner case is the most negative number in a fixed-width representation, which exhibits a unique self-inverse property under two’s-complement. This question spotlights that behavior in 4-bit arithmetic.


Given Data / Assumptions:

  • Fixed width: 4 bits (values wrap modulo 2^4).
  • Input: 1000₂ (which represents -8 in 4-bit two’s-complement).
  • Two’s-complement operation is defined as bitwise invert then add 1, within the same width.


Concept / Approach:
In n-bit two’s-complement, the range is -2^(n-1) to +2^(n-1)-1. For n=4, the most negative number is -8, encoded as 1000₂. Taking two’s-complement of a number gives its negation modulo 2^n. The negation of -8 is +8, which cannot be represented in 4 bits; modulo arithmetic brings it back to 1000. Hence, 1000 is its own two’s complement in 4-bit width.


Step-by-Step Solution:
Invert 1000 → 0111.Add 1 → 0111 + 0001 = 1000 (carry beyond 4 bits is discarded).Result remains 1000.


Verification / Alternative check:
Interpretation: 1000₂ = -8. Negate: -(-8) = +8. But +8 is not representable in 4-bit two’s-complement (max is +7). Modular wrap yields the same pattern 1000, confirming the self-inverse behavior.


Why Other Options Are Wrong:
111 and 0110 and 1110 are unrelated to the defined 4-bit two’s-complement of 1000 and do not reflect the fixed-width arithmetic rule.


Common Pitfalls:
Forgetting fixed width and accidentally using wider arithmetic; assuming every number’s two’s-complement is different from itself without considering the most negative value special case.


Final Answer:
1000

Discussion & Comments

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