Can you subtract binary numbers?

1 0 1 1 0 1 0 1 1 0 1 1 1 \large{\begin{array}{cccccccc} &&1 & 0 & 1 & 1& 0 & 1&0\\ -&&& 1 & 1 & 0& 1 & 1&1\\ \hline && & & & & & &\\ && & & & & & & \\ && & & & & & & \end{array}}

Considering the binary subtraction above, what is the result of this subtraction in binary base?


The answer is 100011.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

In binary base system, 1+1 = 10 as 1 & 0 are the only digits allowed.

Therefore, when subtracting in binary, taking a value from 1 in a higher unit will lead to 1+1 (red) in the lesser unit while 1-1 = 0 and 1-0 =1 still apply in this case. As shown above, the subtraction will lead to a value of 100011 in binary base.

Didn’t understand at all

Mani Baipilla - 3 years, 6 months ago

Log in to reply

I was in the same boat as you reading this so I did some more internet searching for simpler examples. https://www.wikihow.com/Subtract-Binary-Numbers

Basically, you can't do 0-1 in the far right column. So you go to the column to the left and borrow that top 1 (it becomes a 0). Now your original far right 0 becomes a 10. As it says here, 10 (base 2) = 1 (base 2) + 1 (base 2). So now your first far right column has become 1 (base 2) + 1 (base 2) MINUS the 1 (base 2) that you're just subtracting. 1+1-1 = 1.

Just continue that borrowing system for any other 0-1 scenario. The next two columns at this point both feature 0-1 so you have to go to the next available 1 and do a couple of borrowing techniques to make that 2nd column have an available 1 again.

This was my first one so it took me a bit and had to write it and work it out myself on paper as opposed to just looking at the screen's explanation.

Joe L - 3 years, 6 months ago

Log in to reply

Another point that had me hung up here was when I had to go two spaces to the left on the top number in order to borrow the "1". In order to understand this, I had to first understand how borrowing works over multiple spaces.

The number "1" you borrow from becomes a "0"

The next "0" number to the right becomes "1+1"

Next, in order to borrow from this new "1+1" you have to eliminate a "1" so it just become "1" again

Finally, you get back to your original "0" and it becomes a "1+1" now

Hopefully that makes sense and explains why the second "1" in some of the red numbers in the answer are also crossed out!

Adam Derenbecher - 3 years, 2 months ago

So your binary is 1011010 - 110111 so you take the first number of your first input 1 in 1011010 and since that is the seventh digit ( because binary read from right to left instead of left to right) your output is 2^7 (base 2) and you have a 1* in it because your input is 1 so your first digit in your output is 1 2^7 and then the second one, your input is 0 so you just leave it at 0 because 0 2^6 is 0 and you just leave it at zero. Then you repeat the process and you add it all up for eg; 1 2^7(128)+0 2^6(0)=128 and you keep going which will then lead you to 180. You do this again for 110111 but this time there are 6 digits and the first digit you read would be 1 2^6. You keep doing this and you get 110 as your output for the second digit. 180-110 is 70 but you have to write 70 in binary. Since 2^6 is 64 which gets us really close to 70 your first number is 1(1 2^6) then 2^5 is too far so your write 0(0*2^5). 2^4 doesn't work either because 64+16 is above 70. So then you keep going until 2^2 which finally gets you to a 1 number: 4 and 64 + 4 = 68 so it doesn't go over that's why it's one. then you have 2^1 which perfectly gets you to 70 (68+2). If your number was 71 then you would add another 1 to the end and call 70 100011 1000110 then 71 would be 1000111.

JaylindenXX Lin - 2 years, 3 months ago

I just covered to base 10 .and subtracted than converted back:100011 is 35 in base 10

Latifah Ali - 2 years, 4 months ago

Oh and I understand binary addition

Latifah Ali - 2 years, 4 months ago

Yup, this was not well-explained at all. A confusing explanation for sure. I'll seek elsewhere for better understanding.

Charlie Kelley - 2 months, 2 weeks ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...