Binary Subtraction Calculator

Subtract two numbers and show the binary result.

Difference (decimal) 8
Difference (binary) 1000

Formula: a − b, shown in base 2

Step-by-step with your numbers:
1. Values used:
2. Minuend (decimal) = 13
3. Subtrahend (decimal) = 5
4.
5. Difference (decimal) = Minuend (decimal) - Subtrahend (decimal) = 13 - 5 = 8
6. Difference (binary) = 1000
Did we solve your problem today?

Subtract binary numbers; here you enter decimals and read the binary difference.

The math behind it

Subtraction in binary follows the same borrowing rules as decimal, but in base 2. Computers usually use two's complement to subtract.

Worked example

13 − 5 = 8 = 1000 in binary.

FAQ

How do computers subtract?

They add the two's complement of the subtrahend.