Method of Complements - Decimal Example

Decimal Example

To subtract a decimal number y from another number x using the method of complements, the ten's complement of y (nines' complement plus 1) is added to x. Typically, the nines' complement of y is first obtained by determining the complement of each digit. The complement of a decimal digit in the nines' complement system is the number that must be added to it to produce 9. The complement of 3 is 6, the complement of 7 is 2, and so on. Given a subtraction problem:

873 (x, the minuend) - 218 (y, the subtrahend)

The nines' complement of y (218) is 781. In this case, because y is three digits long, this is the same as subtracting y from 999.

Next, the sum of x and the nines' complement of y is taken:

873 (x) + 781 (nines' complement of y) ===== 1654 -1000 (y + nines' complement of y) + 1 or (y + tens' complement of y) ===== 654

The first "1" digit is then dropped, in an effort to keep the same digits as the original, giving 654. This is not yet correct. We have essentially added 999 to the equation in the first step. Then we remove 1000 when we drop the first 1 in the result 1654 above. This will thus make the answer we get (654) one less than the correct answer. To fix this, we must add 1 to our answer:

654 +1 ==== 655

Adding a 1 gives 655, the correct answer.

If the subtrahend has fewer digits than the minuend, leading zeros must be added which will become leading nines when the complement is taken. For example:

48032 (x) - 391 (y)

becomes the sum:

48032 (x) + 99608 (nines' complement of y) ======= 147640

Dropping the "1" yields 47640, and adding the dropped "1" to 47640 gives the answer: 47641.

Read more about this topic:  Method Of Complements

Famous quotes containing the word decimal:

    It makes little sense to spend a month teaching decimal fractions to fourth-grade pupils when they can be taught in a week, and better understood and retained, by sixth-grade students. Child-centeredness does not mean lack of rigor or standards; it does mean finding the best match between curricula and children’s developing interests and abilities.
    David Elkind (20th century)