Difficulty: Easy
Correct Answer: never complemented
Explanation:
Introduction / Context:The 2's-complement method converts subtraction into addition, which hardware adders perform efficiently. Knowing which operand to complement is crucial to avoid sign errors and overflow confusion.
Given Data / Assumptions:
Concept / Approach:In 2's-complement arithmetic, subtraction A − B is implemented as A + (2's complement of B). That is, complement and add one to the subtrahend, not the minuend. The adder adds the minuend unchanged to the complemented subtrahend.
Step-by-Step Solution:
Compute B' = 2's-complement(B) = (~B) + 1.Add: A + B' using the n-bit adder.Ignore the final carry-out for signed arithmetic; check overflow via sign bits.The minuend A remains uncomplemented throughout.Verification / Alternative check:Try A = 5, B = 3 (8-bit). 3 → 00000011; B' = 11111101 + 1 = 11111110? (careful) Correctly: ~00000011 = 11111100; +1 → 11111101 (−3). Then 00000101 + 11111101 = 00000010 with carry out discarded → 2, as expected.
Why Other Options Are Wrong:
Common Pitfalls:Complementing the wrong operand; mixing up 1's vs 2's complement; forgetting to ensure equal bit widths; misinterpreting the carry-out as overflow for signed results.
Final Answer:never complemented
Discussion & Comments