JEE Exam » JEE Study Material » Mathematics » Binary Subtraction

Binary Subtraction

A binary subtraction may be described in simple words as a subtraction operation that occurs between two binary numbers. Binary Numbers are the numbers that consist of only two digits 1 and 0.

To understand binary subtraction, we will first understand what is a binary number. So, binary numbers are the numbers that consist of only two digits 1 and 0. In this topic, we will see in detail, how to perform a Binary Subtraction. But before that, we will see some rules which govern the operation of Binary Subtraction.

Rules of Binary Subtraction

In order to easily perform the operation of binary subtraction, we have to remember some very important rules. 

When we subtract 0 with 0, the result is 0.

That is 0-0=0.

When we subtract 1 with 0, the result is 1 with a borrow of 1.

That is 0-1=1(with a borrow of 1).

When we subtract 0 with 1, the result is 1.

That is 1-0=1.

When we subtract 1 with 1, the result is 0.

That is 1-1=0.

Now we will see how to actually perform some binary subtractions.

Binary Subtraction Method-

Now that we have seen the rules pertaining to Binary Subtraction, we move on to the main topic of Binary Subtraction. There are two methods to subtract two binary numbers. One method is the borrow method and the other method is the complement method.

Borrow Method: – The Borrow Method is very similar to the method of the decimal method of subtraction. Now we will see the rules of subtraction of two numbers using the Borrow Method.

When we subtract 0 with 0, the result is 0.

That is 0-0=0.

When we subtract 1 with 0, the result is 1 with a borrow of 1.

That is 0-1=1(with a borrow of 1).

When we subtract 0 with 1, the result is 1.

That is 1-0=1.

When we subtract 1 with 1, the result is 0.

That is 1-1=0.

Now we have to just align the digits of the two Binary Numbers and perform the subtraction.

Now we will see an example of how to do Binary Subtraction using the Borrow Method.

We will subtract 101 from 1001. 101 in Decimal is 5 and 1001 in Decimal is 9.

Now when we begin, we have to first align the digits together.

1001

 -101

We see that first have to subtract 1 from 1, the result of that is 0.

Now we have to subtract 0 from 0, the result of that is again 0.

Now when we have to subtract 0 from 1, we understand that we have to borrow 1 from the next highest digit. So the result of that is 1.

So (1001)2-(101)2= (100)2

This checks out in Decimal too as 9-5=4.

Now we will look at the Complement Method of subtracting two Binary Numbers.

Complement Method: – The concept of the complement method is pretty easy. It says that instead of subtracting one number from the other number, you add the negative of the second number to the first number. But this is Binary, binary there’s no concept of positive and negative. Fortunately for us, negative in Decimal translated to 1’s complement in Binary. So basically what we have to do is, we have to find out the 1’s complement of the second number and we have to add that complement to the first number. Now, what is 1’s complement? To find the 1’s to complement a binary number, we just have to interchange the 0’s and the 1’s. That is where there is 1, we have to write 0, and where there is 0, we have to write 1.

Now we look at an example to subtract two numbers by the Complement Method.

We will subtract 100101 from 110010.

So first we have to find the 1’s complement of 100101.

The 1’s complement of 100101 is 011010.

So now we have to perform the binary addition of 110010 and 011010.

But before that, we need to know the rules of binary addition 

When we add 0 and 0, the result is 0.

That is 0+0=0.

When we add 0 and 1, the result is 1.

That is 0+1=1

When we subtract 1 and 0, the result is 1.

That is 1+0=1.

When we add 1 and 1, the result is 10 (which is 0 carry 1).

That is 1+1= 10 (which is 0 carry 1).

So now we have to add 110010 and 011010

Arranging the numbers,

  110010

+011010

The result of this operation is 1001100.

However the left most 1 is the carry and must be added to 001100.

So the final result is 001101.

Therefore (110010)2-(100101)2=(001101)2

Now we will see some solved problems related to this topic.

Binary number subtraction example

Q. Subtract 111001 from 101011.

Soln.

First, we take the 1’s Complement of 111001 which is 000110.

Now we have to add 101011 to 000110.

Now arranging the digits,

  101011

+000110

The result of this operation is 111001

And the final result is 000110.

So (101011)2-(111001)2= (000110)2

Conclusion

In this article, we have described the concept of binary subtraction in brief. We have talked about what is binary numbers. We even saw what the rule governing the operation of Binary Subtraction are. Then we saw the two methods of Binary Subtraction. One was The Borrow Method and the other was The Complement Method. Finally, we saw some solved problems related to the topic of Binary Subtraction to understand the topic in a better way.

 
faq

Frequently asked questions

Get answers to the most common queries related to the JEE Examination Preparation.

What are Binary Numbers?

Ans : Binary Numbers are the numbers that employ only two digits that are 1 and 0.  ...Read full

What is Binary Subtraction?

Ans : Binary Subtraction is the process of subtracting one Binary Number from another.

What are two methods of performing Binary Subtraction?

Ans : The two methods of performing Binary Subtraction are The Borrow Method and The Complement Met...Read full

How do we find out 1’s Complement of a Binary Number?

Ans : To find the 1’s complement a Binary Number, we just have to interchange the 0’s and the 1...Read full