Difficulty: Medium
Correct Answer: Incorrect
Explanation:
Introduction / Context:
Binary subtraction is performed either directly with borrows or by adding the two’s-complement of the subtrahend. Verifying a proposed result is a good exercise in basic arithmetic correctness and borrow handling.
Given Data / Assumptions:
Concept / Approach:
Compute 54 − 31 in decimal to sanity-check, then confirm at the bit level. If the decimal result is 23, the proposed 24 is incorrect. Using two’s complement also provides a reliable validation path.
Step-by-Step Solution:
1) Decimal check: 54 − 31 = 23 → expected binary 00010111.2) Two’s complement method: form two’s complement of 00011111.3) Invert 00011111 → 11100000; add 1 → 11100001.4) Add to minuend: 00110110 + 11100001 = 00010111 (discard carry out).5) Result 00010111 equals 23, not 24.
Verification / Alternative check:
Perform direct borrow subtraction bit-by-bit to reach the same 00010111 outcome, confirming the two’s-complement method.
Why Other Options Are Wrong:
“Correct” contradicts both decimal and binary verification. Options about special borrow logic or BCD are irrelevant; the operands are plain binary.
Common Pitfalls:
Borrow mistakes across multiple bits; forgetting to discard the final carry when adding two’s complement in fixed width.
Final Answer:
Incorrect
Discussion & Comments