Difficulty: Easy
Correct Answer: difference = 0 borrow = 0
Explanation:
Introduction / Context:
Single-bit subtraction defines core behavior for multi-bit subtractors. When the minuend bit equals the subtrahend bit and no prior borrow exists, the result is straightforward.
Given Data / Assumptions:
Concept / Approach:
For one bit: difference = a xor b xor borrow_in; borrow_out = (~a & b) | ((~a | b) & borrow_in). With a=b=1 and borrow_in=0, difference=0 and borrow_out=0.
Step-by-Step Solution:
Verification / Alternative check:
Decimal view: 1 − 1 = 0 with no need to borrow.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to specify borrow_in assumptions.
Final Answer:
difference = 0 borrow = 0
Discussion & Comments