Difficulty: Medium
Correct Answer: –14 and –13; –27
Explanation:
Introduction / Context:
Two’s complement is the dominant signed binary representation used by processors. Mastery involves recognizing negative values, converting between binary and decimal, and performing addition with correct overflow interpretation.
Given Data / Assumptions:
Concept / Approach:
For two’s complement: if the MSB is 1, the value is negative and equals the negative of the two’s complement magnitude. To find magnitude: invert bits, add 1. Addition of two’s complement numbers uses ordinary binary addition; discard any carry beyond 8 bits, then interpret the result with sign bit.
Step-by-Step Solution:
Verification / Alternative check:
Decimal arithmetic confirms –27. The sign bit of 11100101 is 1 and magnitude check yields 27, consistent with –27. No signed overflow occurred here because adding two negatives cannot overflow into positive in 8-bit unless magnitude exceeds range, which it does not (range is –128 to +127).
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to invert then add 1 when decoding negatives; mishandling end carry; misinterpreting the sign bit after addition.
Final Answer:
–14 and –13; –27
Discussion & Comments