Difficulty: Easy
Correct Answer: Correct
Explanation:
Introduction / Context:This verifies a straightforward binary addition. We add 0101 (5) to 1111 (15) and check whether the sum equals 10100 (20).
Given Data / Assumptions:
Concept / Approach:Binary addition proceeds bitwise with carries. If the result exceeds the current word width, we extend the width to include the final carry, producing a wider sum.
Step-by-Step Solution:
LSB: 1 + 1 = 0, carry 1.Next: 0 + 1 + carry 1 = 0, carry 1.Next: 1 + 1 + carry 1 = 1, carry 1.MSB: 0 + 1 + carry 1 = 0, carry 1 → write final carry as new MSB.Result: 10100 (decimal 20).Verification / Alternative check:Decimal check: 5 + 15 = 20 → binary 10100.
Why Other Options Are Wrong:
Incorrect: Contradicts standard addition.Saturation/word-size ambiguity: Only relevant if a fixed 4-bit result is required; with natural-width arithmetic, 5-bit result is correct.BCD correction: Not applicable; operands are pure binary, not BCD.Common Pitfalls:Forgetting to emit the final carry as the new MSB.
Final Answer:Correct
Discussion & Comments