Overview
Test Series
Binary numbers are special numbers that use only two digits: 0 and 1. You won’t find digits like 2, 3, 4, or higher in binary. These numbers are used in computers and digital systems. Just like regular numbers, binary numbers can be added, subtracted, multiplied, and divided. Binary subtraction means taking one binary number away from another. The method is similar to normal subtraction, but since only 0 and 1 are used, there are special rules to follow, especially when borrowing. Binary subtraction is an important concept in computer and digital electronics.
In this mathematics article, we will learn what binary subtraction is, what the rules of binary subtraction are, steps to do binary subtraction, binary subtraction using 2’s and 1’s complement, and solve problems based on binary subtraction.
Maths Notes Free PDFs
Topic | PDF Link |
---|---|
Class 12 Maths Important Topics Free Notes PDF | Download PDF |
Class 10, 11 Mathematics Study Notes | Download PDF |
Most Asked Maths Questions in Exams | Download PDF |
Increasing and Decreasing Function in Maths | Download PDF |
Binary subtraction is one of the basic arithmetic operations in the binary number system, which uses only the digits 0 and 1. It works much like decimal (base-10) subtraction but with simpler rules because there are fewer digits. For example, in base 10 we write 1 + 1 + 1 = 3, but in binary we write 1 + 1 + 1 = 11. When subtracting binary numbers, you must handle borrowing carefully, as it occurs more often than in decimal subtraction. If you subtract 1 from 0 in binary, you borrow 1 from the next higher bit and the result becomes 1. Borrowing always comes from a higher-order digit. When subtracting long binary numbers, work column by column and track each borrow to get the correct answer. Binary subtraction is widely used in digital electronics and computing.
Binary subtraction becomes much easier than decimal subtraction when the following rules are understood:
In binary subtraction, we only deal with two digits: 0 and 1. Here are the basic rules you need to follow:
Binary Digits |
Result |
Explanation |
0 – 0 |
0 |
Subtracting 0 from 0 gives 0. |
1 – 0 |
1 |
Subtracting 0 from 1 gives 1. |
0 – 1 |
1 (with borrow) |
You can't subtract 1 from 0 directly. So, you borrow 1 from the next left digit, making the result 1. |
1 – 1 |
0 |
Subtracting 1 from 1 gives 0. |
Example 1: Perform binary subtraction: \(101111 – 010101 = ?\)
Solution: Using the rules of binary subtraction we have
Therefore, The subtraction of \(101111 – 010101 = 011010\).
Example 2: Perform binary subtraction: \(100101 – 011110 = ?\)
Solution: Using the rules of binary subtraction we have
Therefore, the subtraction of \(100101 – 011110 = 000111\).
Let us learn stepwise procedures that how to do binary subtraction with borrowing and without borrowing using the solved examples.
To learn about binary to decimal conversion, please click here.
Example: Subtract \(101\) from \(1001\).
Here the decimal equivalent of \(101\) is \(5\) and \(1001\) is \(9\).
Step 1: Arrange the numbers as shown below.
Step 2: Use the rules of binary subtraction to subtract \(101\) from \(1001\).
Here let us subtract the numbers starting from the right and move to the next higher order digit. The first step is to subtract \((1-1)\), which is equal to \(0\). Similarly, we move on to the next higher order digit and subtract \((0 – 0)\), which is equal to \(0\). In the next step, we have to subtract \((0 – 1)\), so we borrow a \(1\) from the next higher order digit. Therefore, the result of subtracting \((0 – 1)\) is \(1\).
Step 3: Thus the difference of \(101\) from \(1001\) is \(100\).
To verify this, check the decimal equivalent of \(100\), which is \(4\) and \(9 – 5 = 4\). Hence the answer is correct.
To learn about addition and subtraction of decimals, please click here.
Example: Subtract \(100\) from \(1111\).
Here the decimal equivalent of \(100\) is \(4\) and \(1111\) is \(15\).
Step 1: Arrange the numbers as shown below.
Step 2: Use the rules of binary subtraction to subtract \(100\) from \(1111\). In this subtraction, we do not encounter the subtraction of \(1\) from \(0\). Hence, the difference is \(1011\).
Step 3: Thus the difference of \(100\) from \(1111\) is \(1011\).The decimal equivalent of \(1011\) is \(11\). Hence the answer is correct.
To learn about the multiplication of binary numbers, please click here.
Binary subtraction using 1’s complement is a method to subtract two binary numbers. This method allows subtraction of two binary numbers by addition. The 1’s complement of a binary number can be obtained by replacing all \(0\) to \(1\) and all \(1\) to \(0\). For example, the 1’s complement of the binary number \(1101\) is \(0010\).
To perform binary subtraction using 1’s complement, please follow the steps given below:
Step 1: Determine the 1’s complement of the subtrahend (which means the second number of subtraction).
Step 2: Add it with the minuend or the first number.
Step 3: If there is a carryover left, then add it with the result obtained from step 2.
Step 4: If there are no carryovers, then the result obtained in step 2 is the difference of the two numbers using 1’s complement binary subtraction.
For example, Subtract \(110010 – 100101\) using 1’s complement.
Here the decimal equivalent of \(110010\) is \(50\) and \(100101\) is \(37\).
Step 1: 1’s complement of \(100101\) is \(011010\).
Step 2: Add this with \(110010\).
Step 3: Arrange the numbers as given below and add them.
Step 4: So, the leftmost digit \(1\) is a carryover of this addition. Since there is a carryover we add it with the result, which is \(001100\).
Therefore, the answer is \(1101\). And the difference of \(50 – 37 = 13\). The decimal equivalent of \(1101\) is \(13\). So, the answer is verified.
To learn about binary addition using 1’s complement and 2’s complement, please click here.
Binary subtraction using 2’s complement is a method to subtract two binary numbers. For finding 2’s complement of the binary number, we will first find the 1’s complement of the binary number and then add \(1\) to the least significant bit of it. For example, the 2’s complement of the binary number \(110100\). The 1’s complement of the number \(110100\) is \(001011\). Now add \(1\) to the LSB of this number, i.e., \((001011)+1=001100\).
To perform binary subtraction using 2’s complement, please follow the steps given below:
Step 1: In the first step, find the 2’s complement of the subtrahend.
Step 2: Add the complement number with the minuend.
Step 3: If we get the carry by adding both the numbers, then we discard this carry and the result is positive, else take 2’s complement of the result which will be negative.
For example, Subtract \(10101 – 00111\) using 2’s complement.
Here the decimal equivalent of \(10101\) is \(21\) and \(00111\) is \(7\).
Step 1: 2’s complement of \(00111\) is \(11001\).
Step 2: Add this with \(10101\).
Step 3: We get the carry bit 1. So we discard this carry bit and remaining is the final result and a positive number. Therefore the answer is \(1110\).
Since the difference of \(21 – 7 = 14\). The decimal equivalent of \(1110\) is \(14\). So, the answer is verified.
To learn about different types of numbers with definitions and examples, please click here.
(i). \(101\) from \(1001\)
(ii). \(111\) from \(1000\)
Solution: Using the rules for subtraction of binary numbers, solve the following.
(i). Subtract \(101\) from \(1001\):
Thus the answer is \(0100\).
(ii). Subtract \(111\) from \(1000\):
Thus the answer is \(0001\).
Solution: Here the decimal equivalent of \(100010\) is \(34\) and \(110101\) is \(53\).
Now 1’s complement of subtrahend, \(100010\) is \(011101\).
Add this with minuend, \(110101\), then arrange the numbers as given below and add them.
So, the leftmost digit \(1\) is a carryover of this addition. Since there is a carryover we add it with the result, which is \(010010\).
Therefore, the answer is \(10011\). And the difference of \(53 – 34 = 19\). The decimal equivalent of \(10011\) is \(19\). So, the answer is verified.
3. Subtract 1001₂ – 0110₂ using 2’s Complement Method
1001 (Minuend)
+1010 (2’s complement of Subtrahend)
------
10011
The result is: 0011₂
We hope that the above article is helpful for your understanding and exam preparations. Stay tuned to the Testbook App for more updates on related topics from Mathematics, and various such subjects. Also, reach out to the test series available to examine your knowledge regarding several exams.
Download the Testbook APP & Get Pass Pro Max FREE for 7 Days
Download the testbook app and unlock advanced analytics.