00:01
Okay, so in this question, we want to find an algorithm to find the two's complement, given that we know it's one's complement.
00:10
So the basic procedure is if, so if this is in one's complement, one's complement.
00:20
So if a, n, so if the first digit is equal to zero, then you just leave it as is.
00:26
Then this is the two's complement.
00:29
Blah, blah, blah, blah, a1, a, zero.
00:31
So otherwise, so that would be a n is equal to 1, then all we need to do is we just need to add 1 to it.
00:42
Add 1 to it.
00:42
So we just go a .n, a .n minus 1, blah, blah, blah, a1, a0 plus by 1.
00:51
So as an example, so if we have 0 -1 -1 -0 -1, then this is just in one's complement.
00:59
So this is 1...