Difficulty: Medium
Correct Answer: None of the above
Explanation:
Introduction / Context:Two’s complement is the dominant representation for signed integers in computer systems because it yields a single representation for zero, simplifies arithmetic, and keeps addition/subtraction hardware uniform. This question asks for −7 in 16-bit two’s complement.
Given Data / Assumptions:
Concept / Approach:
Step-by-Step Solution:
Write +7 in 16 bits: 0000 0000 0000 0111.Invert all bits (one’s complement): 1111 1111 1111 1000.Add 1: 1111 1111 1111 1000 + 0000 0000 0000 0001 = 1111 1111 1111 1001.Therefore, −7 = 1111 1111 1111 1001 (16-bit two’s complement).Verification / Alternative check:
Add +7 and −7 in 16-bit two’s complement: 0000 0000 0000 0111 + 1111 1111 1111 1001 = 1 0000 0000 0000 0000 (discard carry) → 0000 0000 0000 0000, confirming correctness.Why Other Options Are Wrong:
Common Pitfalls:
Final Answer:
1111 1111 1111 1001 (not listed), so 'None of the above' is correct.
Discussion & Comments