



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Purpose:
o Used in digital computers to simplify subtraction operations.
o Important for logical manipulations.
Types of Complements:
Complements in Various Number Systems:
o r’s complement = 2’s complement
o (r – 1)’s complement = 1’s complement
o r’s complement = 10’s complement
o (r – 1)’s complement = 9’s complement
o r’s complement = 8’s complement
o (r – 1)’s complement = 7’s complement
o r’s complement = 16’s complement
o (r – 1)’s complement = 15’s complement
o r's complement = 𝑟
𝑛
o If N = 0 , then r's complement is simply 0
Example 1.26. Find the 10’s complement of
( 23450 ) 10. Solution:
The 10’s complement of ( 23450 ) 10 = 𝑟
𝑛
5
Example 1.27. Find the 10’s complement of
(0.3245) 10. Solution:
The 10’s complement of
10
𝑛
0
Example 1.28. Find the 10’s complement of
The 10’s complement of (23.324) 10 = 𝑟
𝑛
2
Example 1.29. Find the 2’s complement of
( 10110 ) 2. Solution:
The 2’s complement of ( 10110 ) 2 = 𝑟
𝑛
5
Example 1.30. Find the 2’s complement of
The 2’s complement of
𝑛
0
2
2
Example 1.31. Find the 8’s complement of
8
. Solution:
The 8’s complement of
𝑛
4
8
10
Example 1.32. Find the 16’s complement of
(4A30) 16. Solution:
The 16’s complement of (4A30) 16 = 𝑟
𝑛
4
10
The formula for finding the (r – 1)'s complement is:
Where:
Example 1.33. Find the 9’s complement of
( 23450 ) 10. Solution:
The 9’s complement of
𝑛
− 𝑚
5
0
𝟏𝟎
Example 1.34. Find the 9’s complement of
The 9’s complement of
𝑛
− 𝑚
0
− 4