 Hello friends, I am Sanjay Gupta. I welcome you on my YouTube channel. My YouTube channel contains more than 800 videos on YouTube. You can search those videos through the keyword programming by Sanjay Gupta. You can also search my YouTube channel by typing my name Sanjay Gupta in YouTube search. You can subscribe my YouTube channel if you want to follow programming related videos. If you have any queries, you can connect with me by following these details. In this video, I'm going to discuss binary subtraction. I will explain some examples so that you can understand how we can perform binary subtraction. So before starting examples, you need to understand this subtraction table first. So here you can see I have mentioned four steps. In first step, zero is subtracted with zero, then result will be zero. If two digits are zero and one, so if we are subtracting one from zero, then we have to borrow base from the next higher column. So the result will be one here. So I will explain with the help of example how you can perform this. Then one minus zero result will be one and one minus one result will be zero. So three steps are pretty simple. Second step is difficult, which you will be understanding while I will be explaining the examples. So now I am going to explain the example number one. Here you can see two binary values are available. First one is one zero one zero one and second one is triple one zero. So I am going to explain the subtraction now. So first this subtraction will take place first column one zero. So result will be one. Now in second column, you can see digits are zero and one. So if we are subtracting one from zero, it is not possible. So we need to look for the next possible column. So from here I am going to borrow base. So this one will become zero and I am borrowing base from here. So in case of binary basis two and in binary we represent two as one zero. So it is one zero, which is equivalent to 10 but in case of binary meaning of one zero is two. So now if we subtract one from two, which means result will be one. So I am performing this here. This is borrow part one zero, which is equivalent to two and I am subtracting one. So if I perform this result will be one. Now you can see here the remaining value is zero. So again, we can subtract one from zero. So we need to look for the next column, which is also zero. So we can borrow base from here. So moving to next high column, it is one. So from here we can borrow values. So it will remain as zero and base will be borrowed here. Now I am going to borrow base from here also. So it will become one and base one zero will available here. So base two, or you can say one zero, it is available here. So I borrowed base from here as one zero. One zero is two. So I borrowed base from here also. So if I subtract one from here, it will remain one and base will be available here for third column. So now I can subtract this one from one zero. So result will be one. Here value is one. So if we subtract one from one result will be zero. So this way I have applied subtraction operation with this example by borrowing base from the next high column. So remember that if you borrow base from the next high column, you have to subtract one from that columns value. Now moving to another example. So this example will more clarify the subtraction to you. So first column is zero, zero result will be zero. Second column is zero, zero result will be zero. Then one zero. So result will be one. So this third column will be having value as one. Then if we subtract one, one result will be zero. Then again one, one result will be zero. Now we can't subtract one from zero. So we will move into the next column. Now we have to perform borrow operation. So this one will become zero and we can borrow base here. So basis two, which is represented as one zero in binary. So if we subtract one from two, result will be one. So this way I have applied subtraction operation for example number two. I hope now you have better understanding how I'm going to. Sorry. Hi. How I am using this subtraction operation for two different binary values. Moving to the example number three. Here you can see first column value is one zero. So result is one again one zero result is one then zero zero result is one. Now listen carefully from zero. We can't subtract one. So moving to next column, it is also zero moving to next column. It is one. So now I am going to borrow values from here. So it will become zero. And here I have borrowed the base which is two and represented as one zero. Now I have to borrow value from here also. So this two will remain one and base will be available here as one zero. So now from this one zero, which is two, I am subtracting one. So result will be one from this one. I am subtracting zero. So result will be one. Now here zero is available. We can't subtract one from zero. So again we have to borrow. So this one will remain as zero and a borrow of base will be available here as one zero. So this is two from two. I am subtracting one. So result will be one. Here it is zero. So zero minus zero is zero and one minus one is zero. So finally outcome is one one one zero double one. So this way, for example, number three, I have applied subtraction, subtraction operation. Moving to another example, zero zero is zero zero one. So again, I have to apply borrow operation. So I'm borrowing from here. So this will remain as zero and base two will be available here as one zero. So if we subtract one from two result will be one zero minus zero. Zero minus zero is zero one minus one zero zero minus zero zero and one minus one zero. So this way this example number four has been subjected. Now moving to the another example, which is example number five. So one one result is zero. Now I am subtracting one from zero, which is not possible. So looking to the next possible column. So I have to perform borrow operation. So this one will become zero and borrow of base will be available here in terms of one zero. So now from one zero, I can subtract one and remember. So the result value will be available here as one. Now zero zero zero and one one zero. So this way I have applied separate subtraction operation on these examples. I hope you have understood how we can perform binary suppression through this video. If you have any queries, you can connect with me by following these details. If you want to watch more programming related videos, you can follow my YouTube channel. Thank you for watching this video.