Published by: Nuru
Published date: 22 Jun 2021
Subtraction Using Complements can be done in two ways. We have at first by using r's complement and r-1's Complement. Before starting Subtraction Using Complements, let us know what complement is first.
Complements are of two types:
For the given positive number N in base r with an integer part of n-digits, the r's complement of N is defined as rn-N.
For the given positive number N in base r with an integer part of n-digits and fractional parts of the digits, the (r-1)'s complement is defined as rn-r-m-N.
The subtraction of two positive numbers (M-N) both of base r can be done as follows;
Example: Subtract (72532-3250) using 10's complement.
M= 72532
N= 03250
10's complement of N= 105-3250 = 96750
Now, adding 10's complement of N to M,
72532+96750=169282
Here, end carry occurs as 1. So, 10's complement= 69282
Example: Subtract (1000100-1010100) using 2's complement.
M= 1000100
N= 11010100
2's complement of N=10110
Now, adding 2's complement of N to M
10110+1000100= 110000
Here, end carry occurs as 1, so 2's complement = -10000
The subtraction of two positive numbers (M-N) both of base r-1 can be done as follows;
Example: Subtract (453.35-321.17) using 9's complement.
9's complement of 321.17= 678.82
Now, Adding 9's complement of M to N,
453.35+678.82= 1132.17
Here, end carry occur, so 9's complement = 132.18
Example: Subtract (1000100-1010100) using 1's complement.
M= 1000100
N= 11010100
1's complement of N=101011
Now, adding 1's complement of N to M
101011+1000100= 1101111
Here, end carry doesn't occur as 1, so 1's complement of 1101111= -1000 which is the required answer.