To subtract one number from another, you can do the usual arithmetic algorithm, but you can also use an addition process instead that can be handy for checking subtraction results when working by hand. This avoids doing the identical process with which you got your first result lest you inadvertently repeat making an error you might have made the first time.
Consider the following examples:
8718 - 4732 = 3986 This is completely standard arithmetic.
Now, replace the "4732" with its nines complement which in this case means "5267". Each digit of this new number is that which if added to the corresponding digit of the old number, totals to nine. Ergo, 4+5=9, 7+2=9, 3+6=9 and 2+7=9.
Then add: 8718 + 5267 = 13985.
Remove the leading "1" to get "3985" and then add one to this new number. The result is "3986" which is the correct result.
Other examples, same process:
609 - 211 = 398 609 + 788 = 1397 --> 397 + 1 = 398 Correct.
87658 - 419 = 87239 87658 + 99580 = 187238 --> 87238 + 1 = 87239 Correct.
Note in this last example that "419" is taken as "00419" which has two leading zeros whose nines complement is two nines.
Computer people, software people and the inventor of the Curta Mechanical Calculator(*) have had this down pat since forever, but it is useful to have at the ready.
(*) Please see:
http://www.eetimes.com/electronics-blogs/other/4213942/Amazing--The-Curta-Mechanical-Calculator
Process for negative results is really consistent with that for positive results. When you drop the leading 1 for positive results you're really subtracting that power of 10. Then you add 1. If you do that in the above case, you get 75-100+1=-24. Of course, doing it that way would be silly. 9's compliment rearranges the calculation to -((100-1)-75)=-(99-75)=-24.
You can think of the carry-out (the leading 1) as a '+' sign. For completeness, we have to look at the case of zero result:
25-25=0;
25+74=99 (no carry-out, so treat result as negative):
nines-compliment(99)=0. Or, -(99-99)=0.
Posted by: Dick Neubert | June 23, 2011 at 10:49 AM
thanks a lot 4 this .Nice teachings
Posted by: davie | October 13, 2012 at 07:22 AM
In any base a "sign" digit may be placed to the left of the number. a "0" identifies the number following it as positive, while the "highest count" in that base identifies the number as negative with the understanding that the number following the "highest count" is the complement of the answer to that base. In base ten, 0472=+472 because the first 0 indicates a + and the number is 472. 9528=-472 because the 9 indicates that the number is negative and that the number shown is the ten's complement of the number. To extract the number, the ten's complement of the ten's complement shown must be found. To do this, first subtract 1 from the given ten's complement:
528-1=527. Next find the nine's complement of each digit:
9-5=4, 9-2=7, and 9-7=2. Therefore 9528 is the representation of -472.
This method may be used to subtract by adding. In standard arithmetic 793-472=321. This operation may be done by adding the ten's complement of 0472 to 0793. The nine's complement of 0472 is 9527, and the ten's complement is 9528 ten's complement=nine's complement+1). Therefore 0793+9528=10321. The leading 1 must be ignored because the answer must have as many digits as each of the original numbers (four digits in this case). So the answer (with four digits) is 0321. The "0" indicates that the number following it is positive.
If we wanted to perform the following: 472-793=-321, then we would have to add the ten's complement of 0793 to 0472. The nine's complement of 0793 is 9206, and the ten's complement is 9207. Then 0472+9207=9679. No digits have to be neglected here because two original numbers have 4 digits and the anser has 4 digits. The leading nine indicates that the number is negative and that 679 is the ten's complement of the number. The nine's complement is 678, and the number is 321 because 9-6=3, 9-7=2, and 9-8=1.
Posted by: Ed Brumgnach | November 29, 2012 at 11:18 PM