Subtract one binary number from another using borrow. Learn the rules of binary subtraction with step‑by‑step examples.
Binary Subtraction Rules: 0–0=0, 0–1=1 with borrow, 1–0=1, 1–1=0. Borrowing reduces the next higher bit by 1 and adds 2 to the current column.
Binary subtraction is similar to decimal subtraction, but you only work with 0 and 1. When you need to subtract a larger digit from a smaller one, you borrow from the next higher bit.
A full subtractor handles borrow-in from a previous column and produces a borrow-out for the next column. The table below shows all possibilities:
| Minuend (A) | Subtrahend (B) | Borrow-in (Bin) | Difference (D) | Borrow-out (Bout) |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
Let’s subtract 0011₂ (3) from 1000₂ (8). This example shows how borrow propagates through multiple zeros.
(Borrow) → 1 ← ← ← ←
↓
1 0 0 0 (8)
– 0 0 1 1 (3)
---------
0 1 0 1 (5)
Step‑by‑step column analysis (right to left):
| Column (from right) | Minuend | Subtrahend | Borrow-in | Calculation | Difference | Borrow-out |
|---|---|---|---|---|---|---|
| 0 (LSB) | 0 | 1 | 0 | 0–1 = –1 → need borrow, so add 2: 2–1=1 | 1 | 1 |
| 1 | 0 | 1 | 1 (from col0) | 0–1–1 = –2 → add 2: 2–2=0 | 0 | 1 |
| 2 | 0 | 0 | 1 (from col1) | 0–0–1 = –1 → add 2: 2–1=1 | 1 | 1 |
| 3 | 1 | 0 | 1 (from col2) | 1–0–1 = 0 | 0 | 0 |
The borrow propagates left until it finds a 1 in the minuend (column 3). The final borrow-out is 0, meaning no overflow.
minuend_bit – subtrahend_bit – borrow_in.
borrow_out = 1 for the next column; otherwise borrow_out = 0.
In computer hardware, subtraction is often implemented using addition with two’s complement:
A – B = A + (~B + 1). This avoids separate borrow logic and uses the same adder circuit. For example, to compute 13 – 10, we take two’s complement of 10 (01010₂ → 10110₂) and add:
01101 + 10110 = 100011; discard the carry (the leftmost bit) to get 00011₂ = 3.
Calculator Features: