How to subtract binary numbers?
I need to know how to subtract these binary numbers with workings on how you would do it:
0110101 - 01111110
(53 - 126)
010111000 - 0111001
(184 - 57)
You can do it the same way you do with decimal numbers. Write the number to subtract under the other number, lining up the columns. If the current column is 0 - 1, “borrow” from the first column to the left that has a “1” (every other number between if any will become 1). The current column is then 10 - 1 = 1. The situation is more complicated when the result would be a negative number. If you are doing it from a computer science perspective you may want to use “two’s complement”. See here (example 3 in particular