I've been asked (for homework) to do $ 001001_2 - 110101_2$ (base 2) and to represent the answer in a signed magnitude format.
EDIT: I'm specifically asked:
Perform subtraction on the given unsigned binary numbers using the 2’s complement of the subtrahend. Where the result should be negative, find its 2’s complement and affix a minus sign.
What I did was I took the two's complement of the term being subtracted, so:
110101 (apply one's complement then add one to get the two's complement) 001010 + 000001 ------ 001011
Then I rewrote the problem as an addition:
001001 + 001011 ------ 010100
And checked my work using Wolfarm Alpha.
My answer is wrong, and I don't know why. This process worked for the other three problems like it. However I did notice that this should have been a negative number.
I'd like to know what I missed / what led to this process that works on other questions not working in this case.