BCD Subtraction with 9's complement

3.4k Views Asked by At

I've seen this question in here but this doesn't answer my question, and since I can not comment I wanted to ask a question.

Can we do a BCD subtraction with 9's complement?

I have these two numbers (375-240) in BCD and I can subtract them from each other perfectly using 10's complement. That works fine. But when I wanted to try 9's complement the result always has the opposite sign. ("-" when it should be "+")

And then since it has "-" sign, as you may guess, taking the result's 9's complement gives me something completely different. At least, if I am not mistaken but I've tried it many times.

BCD 375 is 0000 0011 0111 0101

9's complement of 240 (Which is 759) 1001 0111 0101 1001

Then when we add these two I get 1001 0001 0011 0101

We know the answer is negative so I think we should take the result's 9's complement again but that is completely something different. (Which is 0000 1000 0110 0100)

Can you please help me with that? :)

Thank you in advance!