0% found this document useful (0 votes)
31 views5 pages

Complement of A Number System

The document discusses the concepts of complements in number systems, specifically focusing on radix and diminished radix complements, including 2's and 1's complements for binary and 10's and 9's complements for decimal numbers. It provides methods for calculating these complements and demonstrates binary subtraction using 2's complement with several examples. The document outlines the steps for performing binary subtraction and illustrates the process with detailed calculations.

Uploaded by

hossain11223323x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views5 pages

Complement of A Number System

The document discusses the concepts of complements in number systems, specifically focusing on radix and diminished radix complements, including 2's and 1's complements for binary and 10's and 9's complements for decimal numbers. It provides methods for calculating these complements and demonstrates binary subtraction using 2's complement with several examples. The document outlines the steps for performing binary subtraction and illustrates the process with detailed calculations.

Uploaded by

hossain11223323x
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EEE 3103 Fall 19

Complements
There are two types of complements for each base r-system: the radix complement (r’s complement)
and the diminished radix complement(r-1)’s complement.

The two types are referred to as the 2’s complement and 1’s complement for binary number.

And the 10’s complement and 9’s complement for decimal number.

R’s complement
Rn-N Where,
n= Total no of integer digit
N= the number itself
R= base

10’s complement (First Method)


 (52520)10 = 105 -52520 = 47480
 (25.639)10 = 102 – 25.639 = 74.361
10’s complement (Second Method)

52520
First is 0 will be 0
First digit except 0 subtract from 10

Subtract from 9

=47480

2’s complement (first method)


 (101100)2= 26-101100 = 1000000 -101100 = 10100
 (10111)2= 25 -10111 = 100000 – 10111 = 01001
EEE 3103 Fall 19

2’s complement (second method)

101100
First is 0 will be 0

First is 1 will be unchanged


Then 1 will be 0; 0 will be 1
010100

(R-1)’s complement
Rn-R-m – N Where,
n= Total no of integer digit
N= the number itself
R= base
m= no of fractional digit

9’s complement (First Method)


 (52520)10= (105 -10-0 – 52520) = 47479
 (25.639)10= (102- 10-3-25.639)=74.360

9’s complement (Second Method)


Every digit subtract by 9; so (52520)= 47479

1’s complement (First Method)


 (101100)2= 26- 20 - 101100 = 1000000 – 01-101100 = 10011
1’s complement (Second Method)
Every digit subtract by 1; so 101100= 010011
EEE 3103 Fall 19

Binary Subtraction using 2’s complement


The operation is carried out by means of the following steps:

(i) At first, 2’s complement of the subtrahend is found.

(ii) Then it is added to the minuend.

(iii) If the final carry over of the sum is 1, it is dropped and the result is positive.

(iv) If there is no carry over, the two’s complement of the sum will be the result and it is
negative.

Evaluate:

(i) 110110 - 10110

Solution:

The numbers of bits in the subtrahend is 5 while that of minuend is 6. We make the number of
bits in the subtrahend equal to that of minuend by taking a `0’ in the sixth place of the
subtrahend.

Now, 2’s complement of 010110 is (101101 + 1) i.e.101010. Adding this with the minuend.

110110 Minuend

101010 2’s complement of subtrahend

Carry over 1 1 0 0 0 0 0 Result of addition

After dropping the carry over we get the result of subtraction to be 100000.
EEE 3103 Fall 19
(ii) 10110 – 11010

Solution:

2’s complement of 11010 is (00101 + 1) i.e. 00110. Hence

10110 Minuend

00110 2’s complement of subtrahend

11100 Result of addition

As there is no carry over, the result of subtraction is negative and is obtained by writing the 2’s
complement of 11100 i.e.(00011 + 1) or 00100.

Hence the difference is – 100.

(iii) 1010.11 – 1001.01

Solution:

2’s complement of 1001.01 is 0110.11. Hence

Minuend 1010.11

2’s complement of subtrahend - 0110.11

Carry over 1 0001.10

After dropping the carry over we get the result of subtraction as 1.10.

(iv) 10100.01 – 11011.10

Solution:

2’s complement of 11011.10 is 00100.10. Hence

Minuend - 10100.01

2’s complement of subtrahend - 01100.10

Result of addition - 11000.11


EEE 3103 Fall 19
As there is no carry over the result of subtraction is negative and is obtained by writing the 2’s
complement of 11000.11.

Hence the required result is – 00111.01.

You might also like