Now, let us try to do addition using sound numbers, so assume that I have one one one which is the
minus one plus zero one one, which is three.
So I have minus one, plus three, it's a normal addition, even though there is one signed numbers,
it does not change the fact that this is an addition.
So.
One plus one is zero, one to the right, one plus one plus one is one and one to the Carrie.
One plus one is zero and one in the carry, but there is nothing else to add, then we have one right
here.
As you can see now, our system is three bits, but here we got a forward and well, this is not possible.
So what we do is just drop the last bit that we have.
And the result is zero one zero, which is to.
Minus one, plus three is actually a two, so that's correct.
That's great, no subtraction is actually the same thing as Ed. But with a negative number, so if you
say two minus one, you could simply do it as do plus minus one, right.
Because, well, this one is already a representation right here as one on one, so if you add the representation
of DO and the representation of minus one, it's going to be the same result.
So whenever you see something like two minus one, well, you just add the two numbers, the two and
the one.
So whenever you see a subtraction, you just take the second number.
You check it's negative four and then you add the two numbers as simple as that.
So here we have two, minus one is actually two zero one zero here and minus one is one what one is
here.
So we just add them.
So zero plus one is one, one plus one is zero.
And what do they carry?
And one plus one is zero and one to the carry and the one will go down directly because we cannot look
it with anything because it's a carry and nothing to add here.
And then we just drop the last, the fourth, because our system of the three bits, we drop this one
and we get zero zero one, which is one now two minus one is actually one.
So that's correct.
So whenever we see a subtraction, we can easily convert it to an addition.
So actually anything in binary system is an addition when we know the right representation.
So the steps are we convert their disappointment to its second compliment for.
And then we add the two numbers, right?
I mean, if we have to minus one, we put the two, which is the zero one zero.
And you were saying minus one.
We know what is the form of one.
We convert it to its second complement to get the minus one.
Then we can just simply add the two numbers.
Right.
Let us take a look at what we did is we took the one we converted to a second for to its second complement
four, and then we added.
So these are this is what we're talking about here.
We convert the subtrend to its second complement four, and then we add the two numbers instead of subtracting
them.
Now, remember this drop of digit at the end over there?
Well, this special case is called an overflow.
If you're working with anybody in the system or with a computer or a calculator and you or whatever
you're working with in digital systems, I'm sure I'm sure that you are going to hear the term overflow.
It means that the result is too big to be represented in the current binary system.
In our case, when we have a three bits binary system and the result is a forbert.
Well, this fourth bit is the overflow we're talking about.
So it is an overflow case.