Another basic concept of binary operations in binary subtraction. We all know that the first thing we would learn in Mathematics is addition, subtraction, multiplication, and division. In binary subtraction, you will have only two elements: 0 and 1. In this topic, you will learn about binary subtraction in-depth that includes definition, the method, and binary subtraction examples.
What is Binary Subtraction?
Do you think that binary numbers can be subtracted? Yes, the subtraction of binary numbers is possible. It is very similar to the subtraction of base 10 numbers. If you add 1 + 1 + 1 the end result is 3. But according to a binary number system, the value of 1 + 1 + 1 is going to be 1 1. Here, you have to be careful while subtracting or adding because it might get a little confusing.
Binary Subtraction Rules
To make the understanding of binary numbers easier, here are a few binary subtraction rules you should remember and apply them accordingly:
1 – 1 = 0
1 – 0 = 1
0 – 1 = 1 ( you can borrow 1 from the next number)
0 – 0 = 0
Example of Subtraction of Binary Numbers
1. Subtract 1 10 from 1 1 1 0
Solution:
1 1 1 0
1 1 0 (-)
_________
1 0 0 0
_________
Now, let’s learn how to subtract binary numbers.
How do you Subtract Binary Numbers?
Let’s take the same example as the one we used above.
1 1 1 0
1 1 0 (-)
_________
1 0 0 0
_________
Step 1: You subtract the numbers in the one’s column and not down the result. In this case, the value of 0 – 1 = 0. We borrow 1 from the number in the ten’s place and continue with the subtraction.
1 1 1 0
1 1 0 (-)
_________
0
_________
Step 2: Now you subtract the values in the 10’s place. Apply the aforementioned binary subtraction rules.
1 1 1 0
1 1 0 (-)
_________
0 0
_________
Step 3: Subtract the value that is present in the hundreds place value.
1 1 1 0
1 1 0 (-)
_________
0 0 0
_________
Step 4: Since we don’t have anything in the thousand’s place, we retain it as it is.
1 1 1 0
1 1 0 (-)
_________
1 0 0 0
_________
To cross-check if the final result is correct, you need to know the decimal values of the given numbers.
Therefore,
1 1 1 0 – 1 1 0 = 1 0 0 0
14 – 6 = 8
Hence, proved.
Binary Subtraction Example
Example 1: 1 0 1 1 0 1 0 – 0 0 1 0 1 0
1 0 1 1 0 1 0
0 0 1 0 1 0 (-)
____________
1 0 1 0 0 0 0
____________
Cross-checking using the decimal equivalent of the above decimal numbers:
1 0 1 1 0 1 0 = 90
0 0 1 0 1 0 = 10
1 0 1 0 0 0 0 = 80
Subtraction using 1’s Complement
When you’re subtracting a number from another number using one’s complement, you should remember that 0 is the positive sign and 1 is the negative sign.
Binary Subtraction Rules by 1’s Complement
Step 1: First note down the 1’s complement of the number that has to be subtracted (subtrahend)
Step 2: Add Step 1’s result with the minuend.
Step 3: In case a carryover exists, you should add it to the least significant bit.
Step 4: If no carryover exists, take the one’s complement of the result.
Binary Subtraction Examples using 1’s Complement
Example 1: (1110)₂ – (11)₂
Step 1: 1’s complement of the subtrahend
1 1 1 1
0 0 1 1 (-)
_________
1 1 0 0
_________
Step 2: Adding 1’s complement of subtrahend to minuend
1 1 1 0
1 1 0 0 (+)
_________
1 1 0 1 0
_________
Step 3: Since carry over exists, shifting it to the least significant bit.
1 1 1 0
1 (+)
_________
1 0 1 1
_________
Therefore, the answer is 1 0 1 1.
