Understanding Binary Subtraction
Direct Borrow Rules
- 1 − 0 = 1
- 1 − 1 = 0
- 0 − 0 = 0
- 0 − 1 → borrow: becomes 210 → 102 − 1 = 1
When subtracting a larger bit from a smaller one (0 − 1), borrow 1 from higher-order bit (worth 102).
:contentReference[oaicite:2]{index=2}Two's Complement Subtraction
Instead of borrowing, you can convert the subtrahend using two’s complement (invert bits, add 1), then add to the minuend.
:contentReference[oaicite:3]{index=3}Example
1100 (minuend) - 1011 (subtrahend) ──────────── 0011 (difference)
- 0 − 1 → borrow → becomes 10 − 1 = 1
- Borrow reduces higher bit accordingly
- Final difference: 0011
Binary subtraction is vital for low-level computing, ALU operations, and digital logic design.