9s complement and 10s complement | Subtraction

💡
Key learnings:
  • 9’s Complement Definition: 9’s complement is defined as subtracting each digit of a decimal number from 9.
  • 10’s Complement Procedure: To find the 10’s complement, add 1 to the 9’s complement of the number.
  • 9’s Complement Subtraction: This method involves adding the 9’s complement of the number you are subtracting to the other number and adjusting for any carry.
  • 10’s Complement Subtraction: Similar to 9’s complement, but it uses the 10’s complement and discards the carry to find the result.
  • Handling the Carry: The presence or absence of a carry affects the final result in both 9’s and 10’s complement subtractions, determining if the result should be positive or taken as the complement.

9’s and 10’s complements let subtraction be performed as fixed-width decimal addition. The method depends on the number of digits and on whether the addition produces an end carry. This article covers:

  1. 9’s complement
  2. 10’s complement
  3. 9’s complement subtraction
  4. 10’s complement subtraction

For an n-digit decimal value, the 9’s complement equals (10n – 1) minus that value. You can calculate it one digit at a time by subtracting each digit from 9. Keep leading zeros so both operands use the same width. The table shows the digit mapping.

Decimal digit9s complement
09
18
27
36
45
54
63
72
81
90

The 10’s complement of a nonzero n-digit value is its 9’s complement plus 1. It can also be calculated directly as (10n – number). The fixed width matters because it determines the power of 10. The next example uses three digits.

For decimal 456, subtract each digit from 9 to get the 9’s complement 543:

Add 1 to get the 10’s complement 544:

9’s-complement subtraction
The first example produces an end carry and a positive result.

A = 215
B = 155
Calculate A − B with 9’s-complement subtraction.

First find the 9’s complement of B.

Add the 9’s complement of B to A.

The leading 1 is the end carry. Remove it and add 1 to the remaining three-digit result.

The result is positive 60. Now use four-digit operands.
A = 4567
B = 1234
Calculate A − B.
The 9’s complement of B is:
8765
Add it to A.

Remove the end carry and add it to 3332.
3333
The answer is positive 3333.
If there is no end carry, take the 9’s complement of the n-digit sum and mark the answer as negative.

Subtraction by 10’s complement
Use the same procedure.
Start with the first pair of operands.
A = 215
B = 155
The 10’s complement of B is 845.
Add the 10’s complement of B to A.

Discard the end carry.
The answer is positive 60.
Now use the four-digit operands.
A = 4567
B = 1234
The 10’s complement of B is 8766.
Add it to A.

Discard the end carry.
The answer is positive 3333.
If there is no end carry, take the 10’s complement of the n-digit sum and mark the answer as negative.

Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.

Leave a Comment