How to find 10's complement of decimal number

user5011938 picture user5011938 · Jul 19, 2015 · Viewed 26.9k times · Source

Whats the 10's complement of 1056.074?

Please check the solution:

9999.999 - 1056.074 = 8943.925 (9's complement of 1056.074)

Now 1 is added to .074 or 8943?

Answer

Am_I_Helpful picture Am_I_Helpful · Jul 20, 2015

Actually I missed a point mentioning in the comment, so I am adding it here. It will help the future visitors at least.

As you have correctly calculated the 9's complement of 1056.074, which is equal to [(104) - (1*(10-3))] - 1056.074 = 9999.999 - 1056.074 = 8943.925.

Now, as you have to calculate the 10's complement of the number, so 1 has to be added to the decimal(floating point) end at the LSB, not to the number itself, so that it preserves the 10's complement rule.

So, 10's complement of the number = 9's complement of the number + 0.001(i.e.,1 is added only to the LSB part) = 8943.926.