Last updated on July 25th, 2025
The binary number system is based on the base-2 system, which includes only 0 and 1. One of the four basic operations in this binary system is binary subtraction, which involves subtracting one binary number from another. In this article, binary subtraction and its application will be discussed.
The binary number system is a base-2 system, which means it only involves two digits, that is, 0 and 1. The word “bi” means two, which is why this system is called the binary number system. For example, (101101)2, (001)2, (1010)2, etc.
One of the basic operations of the binary number system is binary subtraction. It is similar to basic subtraction in the base-10 number system, but has different borrowing rules. In the base 10 number system, 10 - 1 = 9, but in the binary system, 102 - 12 = 12. Here are the basic rules of binary subtraction:
X |
Y |
X - Y |
0 | 0 | 0 |
0 | 1 |
1 (with borrow 1) |
1 | 0 | 1 |
1 | 1 | 0 |
To store the data in computers, we use binary numbers because they can only process binary digits, 0 and 1. There are different methods of binary subtraction, such as:
Binary Subtraction Using 1’s Complement
In binary subtraction using 1’s complement, we simply add the complement of the subtrahend to the minuend. To find the 1’s complement of a binary number, we change the digit 0 to 1 and 1 to 0. For instance, let’s find the 1’s complement of (0011)2. We start from right to left, that is, 1 is changed to 0, then 1 is changed to 0, then 0 is changed to 1, and 0 is changed to 1. Here, 1’s complement of (0011)2 is (1100)2. To subtract the binary number using 1’s complement, follow these steps:
Step 1: Identify the minuend and subtrahend
Identify the minuend and subtrahend. For instance, when subtracting (10101)2 from (11011)2, the minuend is (11011)2, and the subtrahend is (10101)2
Step 2: Take the 1’s complement of the subtrahend
The 1’s complement of the subtrahend is obtained by reversing the digits, that is, 0 to 1 and 1 to 0. Here, the subtrahend is (10101)2, and the 1’s complement is (01010)2
Step 3: Find the sum of the minuend and the 1’s complement of the subtrahend
Next, we add the minuend and the 1’s complement of the subtrahend. Here we add (11011)2 and (01010)2. The sum is (100101)2.
Step 4: Adding the leftmost digit
As there is an extra 1 in the leftmost position, we add it back to the sum: 00101 + 1 = 00110
Therefore, the answer is (00110)2.
Binary Subtraction Using 2’s Complement
In this method, we add the 2’s complement of the subtrahend to the minuend. Let’s see how to subtract binary using 2’s complement.
Step 1: Identify the minuend and subtrahend.
Step 2: Find the 1’s complement by reversing the bits (change 1 to 0 and 0 to 1), then add 1 to get the 2’s complement
Step 3: Add the minuend and the 2’s complement of the subtrahend
For example, subtract (10101)2 from (11011)2
Identify the minuend and subtrahend. Here, the minuend is (11011)2 and the subtrahend is (10101)2
To find the 2’s complement of the subtrahend, we first find the 1’s complement.
That is, (10101)2 becomes (01010)2
To get the 2’s complement, we add 1 to the 1’s complement, that is, (01010)2 + 1 = (01011)2
Now, add the minuend and the 2’s complement of the subtrahend, (11011)2 + (01011)2 = (100110)2
So, the answer is (100110)2
Binary Subtraction with Borrowing
The binary subtraction is similar to the decimal subtraction. If necessary, borrowing is done, as we subtract bit by bit. Here is the step-by-step guide to binary subtraction with borrowing.
Step 1: To subtract the binary numbers, we first align the numbers in order
Step 2: Using the binary principle, subtract the number. The subtraction starts from right to left, and if needed, do the borrowing.
For example, subtract (1010)2 from (11100)2
Arranging the numbers in proper order, that is
As the subtrahend has 4 bits, we write it as (01010)2 to align, so it can be written as
Subtracting from the rightmost bit,
First digit from right: 0 - 0 = 0
The next digit is 0 - 1, so we need to borrow from the left. That is, the nearest 1 (the third bit) becomes 0, so 10 - 1 = 1
Next digit: 1 - 1 = 0
Last digit: 1 - 0 = 1
So, (11100)2 - (01010)2 = (10010)2.
Binary Subtraction without Borrowing
In this method, we subtract the binary numbers bit by bit from right to left. When no borrowing is needed, then we subtract each bit from right to left directly. In this section, we can see the step-by-step instructions for doing binary subtraction without borrowing.
Step 1: Arrange the numbers in order
Step 2: Subtract the number bit by bit from right to left.
For example, subtract (1001)2 from (11011)2
Arranging the numbers in order,
As the subtrahend has only 4 bits and to align it using 5 bits, we write it as (01001)2
Subtracting the number bit by bit from the rightmost bit to the leftmost bit,
From the rightmost bit, 1 - 1 = 0
The next bit: 1 - 0 = 1
The next bit: 0 - 0 = 0
The next bit: 1 - 1 = 0
The last bit: 1 - 0 = 1
So, the answer is 10010.
Binary subtraction and decimal subtraction are performed in the same manner. When subtracting a binary number, there are some special rules. Here are a few rules to be followed when doing binary subtraction.
Binary Number |
Subtraction Value |
Rule |
0 - 0 |
0 |
When subtracting 0 from 0, the result is 0. |
1 - 0 |
1 |
When subtracting 0 from 1, the result is 1. |
0 - 1 |
1 |
As 1 is bigger than 0, we cannot subtract 1 from 0; we borrow 1 from the next digit. So we subtract 1 from 10 and the result is 1. |
1 - 1 |
0 |
When we subtract 1 from 1, the result is 0. |
Binary subtraction is a basic operation in the binary number system. To master binary subtraction, follow these tips and tricks.
Memorize the basic rules: 1 - 0 = 1
1 - 1 = 0
0 - 0 = 0
0 - 1 = 1
Always align binary numbers and add zeros if required to write the number with the same number of bits.
Make sure you always start the subtraction from right to left.
One of the fundamental arithmetic operations is binary subtraction. It plays a major role in computer science, digital electronics, programming, and many other fields. Here are some applications of binary subtraction.
When working on binary operations, errors are common among students, especially in binary subtraction. To master binary subtractions and reduce errors, understand these mistakes and try to avoid them.
Find the value of 10112 - 00102
The result of 10112 - 00102 = 10012
Subtracting the number bit by bit from right
The digit: 1 - 0 = 1
Next digit: 1 - 1 = 0
Next digit: 0 - 0 = 0
Next digit: 1 - 0 = 1
So, 10112 - 00102 = 10012
Subtract 101102 - 11102 using 1’s complement
101102 - 11102 = 010002
The minuend is 101102
The subtrahend is 11102, and it becomes 011102
The 1’s complement of the subtrahend is (01110)2 is (10001)2
Adding the minuend and the 1’s complement of the subtrahend, that is (10110)2 + (10001)2 = (00111)2
Adding 1 to the sum: (00111)2 + 1 = (01000)2
Subtract (111101)2 - (10111)2 using 2’s complement
(111101)2 - (10111)2 = (100110)2
To subtract binary numbers using the 2’s complement, we should first find the 2’s complement of the subtrahend.
Here, the minuend is (111101)2 and the subtrahend is (10111)2
Finding the 2’s complement of the subtrahend,
The 1’s complement of (010111)2 is (101000)2
Adding (101000)2 + 1 = (101001)2, so the 2’s complement is (101001)2
Adding (111101)2 and (101001)2
The result is (100110)2
Subtract 1110002 - 1011012
(111000)2 - (101101)2 = (1011)2
Arranging the numbers
Subtracting the numbers from right to left
Subtract using 1’s complement: 1010012 - 110102
(101001)2 - (11010)2 = (001111)2
The 1’s complement of the subtrahend (11010)2 is (100101)2
Adding (101001)2 + (100101)2
Adding 1 to (001110)2 gives (001111)2
Hiralee Lalitkumar Makwana has almost two years of teaching experience. She is a number ninja as she loves numbers. Her interest in numbers can be seen in the way she cracks math puzzles and hidden patterns.
: She loves to read number jokes and games.