Computer Science, asked by Akonvict9118, 30 days ago

The subtraction two number in binary -7 and +3= -4. This can be performed
as

Answers

Answered by gayenbanasree
0

Answer:

Sid Method :

Lets say we have to subtract 5–3 = 2 in Binary system.

5 = 101 , 3 = 11 and result is 10 = 2

So what we should do is, take the bigger number’s binary representation and just subtract the binary representation of smaller number using decimal system method only. i.e.,

101– 11 = 90

Now we know that ‘9’ is not a binary number. So just change ‘9’ to ‘1’ and we are good to go. We have ’10' as the answer which is what we want :)

Now question is : what all decimal numbers can come when we subtract two numbers in binary system ?

Answer is : 0 , 1 , 8 and 9.

What you have to do is : change ‘8’ with ‘0’ and ‘9’ with ‘1’

Why ? No reason :) But just think of it to be in binary form. ‘9’ is odd and therefore 9 mod 2 = 1 and 8 mod 2 = 0.

OR 8 more looks like two ‘0’s and 9 looks like 1 :) Whatever …

It saved my life just to verify my answer if I had to subtract two binary systems using ‘cpu’s method.

Please do comment / correct if you get to know any fault.

Similar questions