Using two's-complement arithmetic with 8-bit representation, compute the sum of −11 and −2. Give the final two's-complement result.

Difficulty: Easy

Correct Answer: 1111 0011

Explanation:


Introduction / Context:
Two's-complement representation is the standard way to encode signed integers in digital systems. This question practices encoding negative numbers and performing signed addition, which is identical to unsigned addition at the bit level when using two's complement.


Given Data / Assumptions:

  • Word size: 8 bits.
  • Operands: −11 and −2.
  • We must return the final 8-bit two's-complement sum.


Concept / Approach:
In two's complement, to represent −N, write N in binary, invert all bits, then add 1. Signed addition is then performed just like unsigned addition, with any carry out of the MSB discarded. The result remains valid within range −128 to +127 for 8 bits.


Step-by-Step Solution:
1) Encode +11: 0000 1011.2) Two's complement for −11: invert → 1111 0100, add 1 → 1111 0101? (check carefully)Correct computation: 0000 1011 → invert 1111 0100 → add 1 = 1111 0101 is −11.3) Encode −2: +2 is 0000 0010 → invert 1111 1101 → add 1 = 1111 1110.4) Add: 1111 0101 + 1111 1110 = 1 1110 10011? Let’s add carefully:1111 0101+1111 1110=1 1111 0011 (discard the leading carry)5) Result: 1111 0011, which is the two's-complement code for −13.


Verification / Alternative check:
Decimal check: −11 + (−2) = −13. Two's-complement of 13: +13 = 0000 1101 → invert 1111 0010 → add 1 → 1111 0011. This matches the computed sum.


Why Other Options Are Wrong:
1110 1101: corresponds to −19 (two's complement of 0001 0011).1111 1001: corresponds roughly to −7.1110 1001: corresponds to −23.0000 1101: this is +13, not −13.


Common Pitfalls:
Mistakes occur when inverting and adding 1, or when mishandling the end-around carry; remember to discard the final carry in fixed 8-bit arithmetic.


Final Answer:
1111 0011

Discussion & Comments

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