Binary Subtraction Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Type two binary numbers using only 0 and 1; the calculator subtracts the second from the first.
Result
Difference in binary
First number in decimal
- Second number in decimal
- Difference in decimal
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Number to subtract from (binary, 0s and 1s, up to 15 digits): enter 0 or more.
- Number to subtract (binary, 0s and 1s, up to 15 digits): enter 0 or more.
- Read the result: Difference in binary; the panel also shows First number in decimal, Second number in decimal and Difference in decimal.
How this calculator works
Binary subtraction goes column by column from the right: 0 − 0 = 0, 1 − 0 = 1, 1 − 1 = 0, and 0 − 1 needs a borrow from the next column (10 − 1 = 1).
When the second number is larger, the result is negative and is shown with a minus sign. Computers instead store negative numbers in two's complement, a different notation for the same value.
Worked example
| Number to subtract from (binary, 0s and 1s, up to 15 digits) | 11,010 |
|---|---|
| Number to subtract (binary, 0s and 1s, up to 15 digits) | 1,011 |
| First number in decimal | 26 |
|---|---|
| Second number in decimal | 11 |
| Difference in decimal | 15 |
| Difference in binary | 1111 |
Frequently asked questions
What is 11010 − 1011 in binary?
1111: 26 − 11 = 15.
What is 101 − 1100?
−111: 5 − 12 = −7.