When you are doing arithmetic two's complement, the leftmost bit is $0$ for positive numbers, $1$ for negative numbers. You started with $110101$ (base $2$), which is $53$ (base $10$) when treated as an unsigned number, but you proceeded to treat it as a six-bit number in a two's-complement representation. Since the leftmost bit is $1$, that makes it a negative number; its value then is $-11$ (base $10$). You then proceeded to take $9 - (-11)$, and produced the correct result for that problem, namely the value $20$ (base $10$).
The desired answer, $-44$ (base $10$), is not representable in six-bit two's-complement arithmetic. The range of numbers in that system is only $-32$ to $31$ (base $10$) inclusive.
To correctly treat $110101$ (base $2$) as a positive binary number while doing two's-complement arithmetic, you need to use more than six bits in your numbers, so that the leftmost bit is no longer $1$. Try rewriting your problem using seven-bit numbers, like this:
$$ 0001001 - 0110101 \mbox{(base $2$)}. $$
Lets say the question is 01001 - 1110
Now we have two options. Calculate is using Unsigned System and then do it using signed system.
Unsigned System
01001 is five bits while 1110 is four bytes.
The first step is to sign extend and make sure they both are of equal length.
For unsigned, we sign extend by adding "0s" on left most side.
Hence,
1110 -> 01110
Now the subtraction.
In term of decimal the question looks like this: 9-14. Which is -5
// Taking 2s compliment of 01110
01110 -> 10001 // Inverting Bits
10001 + 1 -> 10010 // Adding one
Now,
01001 // 9
10010 // -14
+ -----
11011 // -5 if we consider it signed system, otherwise 27
"No final carry in step 2 indicates a final borrow, or a greater “2nd number” than the “1st number”, hence an impossible subtraction." In unsigned, -5 can't be represented anyways. Hence Overflow occured.
Signed System
For signed System the procedure is more or less the same. The major difference would be the sign extension.
For signed numbers, to do signed extension, we just repeat whatever the MSB is.
For 1110, MSB is 1
Hence,
1110 -> 11110
Now the subtraction.
In term of decimal the question looks like this: 9-(-2). Which is 11.
// Taking 2s compliment of 01110
11110 -> 00001 // Inverting Bits
00001 + 1 -> 00010 // Adding one
Now,
01001 // 9
00010 // -2
- -----
01011 // 11, as expected
Since the carry bit arriving arriving at the sign column is same from the carry bit leaving this column. We have no overflow.
Best Answer
Your problem is that the computation overflows when you're using only 4 digits. Even your input is out of range: Representing $-9742$ as
0258
leaves no clue that the original input was actually $-9742$ rather than $258$.The way out of this is to use enough digits that both the inputs and the result has a sign digit at the front. With 5 digits $$ (-9742)+(-641) = ? $$ gets represented as $$ \mathtt{90258} + \mathtt{99359} = {}_1\mathtt{89617}$$ where the small ${}_1$ denotes a carry out that you ignore because you're working with a word lenght of 5 digits only.
Assuming there was no overflow (which there isn't in this case, though it might have been prudent to use yet another digit), the leading
8
tells us that the result is negative (if we're assuming a symmetric overflow interval this is the case when the leading digit rounds up).We can then translate
89617
back to what it represents: $89617-100000=-10383$ as it should be.This assumes that you're using 10s complement as a didactic tool to understand computer arithmetic, which uses 2s complement with fixed word length. If we're approaching this from a more mathmematical angle, the principled thing would be to have infinitely many digits, with numbers stretching to the left as long as the digits are eventually all 9 or eventually all 0.
(In fancier words, this corresponds to calculating with the homomorphic image of $\mathbb Z$ in the 10-adic integers).
We would then represent $$ (-9742) + (-641) = {?} $$ as $$ {.}{.}.9990258 + {.}{.}.999359 = {.}{.}.99989617 $$ and then we don't need to hedge stuff about overflow, because this result unambiguously represents $-10383$.