Two’s-complement interpretation and addition For 8-bit two’s-complement numbers 11110010 and 11110011, determine each value in decimal and the sum.

Difficulty: Medium

Correct Answer: –14 and –13, –27

Explanation:


Introduction / Context:
Two’s-complement is the standard signed binary representation. Correctly decoding negatives and performing additions is essential for digital design and embedded programming.



Given Data / Assumptions:

  • Word size: 8 bits.
  • Numbers: N1 = 11110010, N2 = 11110011.
  • Two’s-complement interpretation is required.


Concept / Approach:
If the most significant bit is 1, the number is negative. Magnitude is found by taking the two’s complement: invert all bits and add 1. Sum in two’s-complement naturally handles negatives; overflow is ignored if the true mathematical result fits within range.



Step-by-Step Solution:
N1 = 11110010 → invert = 00001101, add 1 → 00001110 = 14 → N1 = –14.N2 = 11110011 → invert = 00001100, add 1 → 00001101 = 13 → N2 = –13.Sum: –14 + –13 = –27.Check range: 8-bit two’s-complement range is –128 to +127, so –27 is representable.


Verification / Alternative check:
Binary addition: 11110010 + 11110011 = 11100101 with carry out discarded; interpret 11100101 → invert 00011010, add 1 → 00011011 = 27 → negative → –27. Matches.



Why Other Options Are Wrong:
–113 and –114, 227: incorrect magnitudes and impossible sum for 8-bit signed range.–27 and –13, 40: first magnitude wrong; sum does not match.–11 and –16, –27: wrong individual values though the sum coincidentally matches.


Common Pitfalls:
Forgetting the add-1 step after inversion, or misinterpreting 8-bit wrap-around when checking sums. Always re-verify with both decimal reasoning and binary addition.



Final Answer:
–14 and –13, –27

Discussion & Comments

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