159 total views

In digital computer systems, arithmetic operations are simplified using the radix complement system also known as r’s complement system. The r stands for radix which is a base for a number in a particular number system. In this post, you learn to do subtraction using 10’s complement.

You must be familiar with the complement system in digital logic to understand this subtraction method. To learn about complements visit the following link.

Examples of number system are decimal, binary, octal, hexadecimal. In a binary system we have complements.

For example,

If you talk about a binary system, the base is 2, then we have two types of r’s complement.

- r’s complement
- (r-1)’s complement

For decimal number the r’s complement is 10’s complement and (r-1)’s complement is 9’s complement because base is 10. In other words, decimal number has base r = 10, so 10’s complement and r-1 = 9, so 9’s complement. The binary number has base r = 2, 2’s complement and r-1 = 1 , so one’s complement.

**Q1. Subtract using 10’s complement 52 – 12 .**

We know that 52 – 12 = 40

Let m = 52 and n = 12

Take 10’s complement of 12

+99

-12

_____

+87

Now, 87 is 9’s complement because we subtracted it with 99. To make it 10’s complement add 1 to 87. The 10’s complement of 12 is 88. Add the 88 to m

+52

+88

______

140

______

Answer : Remove the extra 1 and you get 40

Check the second example.

**Q2: Subtract using 10’s complement 12 – 52**

We know that 12 < 52 , so answer is -40

Let m = 12 and n = 52

10’s complement of 52

+99

-52

______

+47

______

The 9’s complement of 52 is 47. To make it 10’s complement add 1 to 47.

Add 48 to m

+12

+48

_____

+60

_____

This is not the answer , wait

Take one more 10’s complement of the result.

+99

-60

____

+39

____

The 9’s complement of 60 is 39. Add 1 to 39 and make is 10’s complement.

Add negative to the result because m > n.

Answer: -40

### Summary

How do I take 10’s complement ?

Suppose n = 123 then

There are 3 digits in 123. The 10’s complement would be 9’s complement + 1.

999 – 123 = 876

876 + 1 = 877

Therefore, the 10’s complement of 123 is 877.

### References

- John.F.Wakerly. 2008.
*Digital Design: Principles And Practices, 4/E.*Pearson Education, India. - Mano, M. Morris. 1984.
*Digital Design.*Pearson.