[Math] Unsigned Integer Binary Subtraction

binary

So I am having a bit of an issue. First, what is the difference between doing an unsigned binary integer subtraction and doing a signed integer subtraction? I think that is what is confusing me. For an unsigned integer, I was told that you have to add a 0 next to the most significant bit (I may be wrong), but I don't feel comfortable with that. After watching a couple of videos on youtube, I tried to the subtraction.

0011 0001 – 1010 1011

My thought process:
I decided to take 1010 1011 and do one's complement and then two's complement and then add it to 0011 0001.

Click here to see my work

Best Answer

In unsigned binary, all numbers are positive and you can't subtract a larger one from a smaller one. If we translate your problem to base $10$ we get $49-171$ which does not have an answer. For unsigned binary you just do subtraction like you learned in school except in base $2$, borrowing when necessary. So if we want to do your problem in reverse, $171-49$ we get $$\begin {align}1010 1011&\\ \underline {-0011 0001}& \\01111010& \end {align}$$ where we borrowed in the $2^5$ place and it carried to the next two.