How is this binary subtraction done?

429 Views Asked by At

Binary subtraction photo

How is the binary subtraction done in the photo attached? I know there are several ways to compute it, but I'm specifically asking for the way my professor did it in that photo.

2

There are 2 best solutions below

0
On BEST ANSWER

You need to ask your professor for what the specific notation means, but it appears that s/he is just starting from the right hand side, and they are putting a line through the digit on the top line whenever they need to take a term from the next column.

So the zero in the third column becomes a "10" in binary as a 1 is taken from the fourth column. Since the number in the fourth column is a 0, a 1 can't be taken from it, so it becomes a "10" by taking a 1 from the fifth column (so that 1 becomes a 0). Now the the "10" in the fourth column becomes a 1 (since we need to take a one for the third column). That leaves a 1, which is written on the top row of the fourth column. I hope you get the idea as one continues in this way. This sounds like the Tom Lehrer song about new math.

0
On

Starting at the right:

  • zero from one is one
  • one from one is zero
  • one from zero is not possible
    • try to borrow from next column but cannot
    • borrow from next to next column
    • leaving one in next column and zero in next to next column
    • one from two is one
  • zero from one is one
  • one from what is now zero is not possible
    • borrow from next column
    • leaving zero in next column
    • one from two is one
  • zero from what is now zero is zero
  • zero from zero is zero
  • zero from zero is zero