You are on page 1of 9

Complements in digital

electronics
Presented by:by:
Presented dolitha chowdary
Harshitha, , 22D21A0515
prathyusha , pujitha , kalyani, ,CSE-A
dolitha
511-515
Contents:
1’s complement
-addition
- subtraction
2’s complement
-addition
- subtraction
9’s complement
10’s complement
1’s complement
The complement is used for representing the negative decimal
number in binary form.
Subtraction using 1's complement
Example 1: 10101 - 00111 Example 2: 10101 - 10111
We take 1's complement of We take 1's complement of
subtrahend 00111, which comes subtrahend 10111, which comes
out 11000. Now, sum them. So, out 01000. Now, add both of the
10101+11000 =1 01101. numbers. So,
In the above result, we get the 10101+01000 =11101.
carry bit 1, so add this to the LSB In the above result, we didn't get
of a given result, i.e., the carry bit. So calculate the 1's
01101+1=01110, which is the complement of the result, i.e.,
answer. 00010, which is the negative
number and the final answer.
2's complement
Just like 1's complement, 2's complement is also used to represent
the signed binary numbers.
Subtraction using 2's complement
Example 1: 10101 - 00111 Example 2: 10101 - 10111
We take 2's complement of We take 2's complement of
subtrahend 00111, which is 11001. subtrahend 10111, which comes
Now, sum them. So, out 01001. Now, we add both of
10101+11001 =1 01110. the numbers. So,
In the above result, we get the 10101+01001 =11110.
carry bit 1. So we discard this carry In the above result, we didn't get
bit and remaining is the final result the carry bit. So calculate the 2's
and a positive number. complement of the result, i.e.,
00010. It is the negative number
and the final answer.
9's Complement
The 9's complement of a number is calculated by subtracting each
digit of the number by 9.
10's Complement
The 10's complement of a number is calculated by subtracting each
digit by 9 and then adding 1 to the result.
Thank you
Presented by: dolitha 515, kalyani 514, harshitha 511 , prathyusha 512 ,
pujitha 513.

You might also like