0% found this document useful (0 votes)
33 views4 pages

Assignment 1606124064 Sms

1) The document discusses complement arithmetic, which is used in digital computers to simplify subtraction and logical manipulations. There are two types of complements for each radix system: radix complement and diminished radix complement. 2) For decimal numbers, 9's complement and 10's complement are used. 9's complement is found by subtracting each digit from 9. 10's complement adds 1 to the result of 9's complement. 3) Subtraction using complements involves adding the complement of the subtrahend to the minuend. If a carry results, the answer is positive. No carry means the answer is negative and the complement of the result must be taken.

Uploaded by

SURABHI KUMARI
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)
33 views4 pages

Assignment 1606124064 Sms

1) The document discusses complement arithmetic, which is used in digital computers to simplify subtraction and logical manipulations. There are two types of complements for each radix system: radix complement and diminished radix complement. 2) For decimal numbers, 9's complement and 10's complement are used. 9's complement is found by subtracting each digit from 9. 10's complement adds 1 to the result of 9's complement. 3) Subtraction using complements involves adding the complement of the subtrahend to the minuend. If a carry results, the answer is positive. No carry means the answer is negative and the complement of the result must be taken.

Uploaded by

SURABHI KUMARI
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
You are on page 1/ 4

SeMester- 1st

Paper Code:- 1BCA 1


Unit – 3 ( data representation – 2nd Part )
Complement Arithmetic :-
Complements are used in the digital computers in order to simplify the
subtraction operation and for the logical manipulations. For each radix-r
system (radix r represents base of number system) there are two types of
complements.
S.N Complement Description
.
1 Radix Complement The radix complement is referred to as
the r's complement
2 Diminished Radix The diminished radix complement is
Complement referred to as the (r-1)'s complement
Decimal Number System Complement : 9's and 10's Complement :-
If the number is binary, then we use 1's complement and 2's complement. But in
case, when the number is a decimal number, we will use the 9's and 10's
complement. The 10's complement is obtained from the 9's complement of the
number, and we can also find the 9's and 10's complement using the r's and (r-
1)'s complement formula.
9's Complement :-
The 9's complement is used to find the subtraction of the decimal numbers. The
9's complement of a number is calculatedby subtracting each digit of the
number by 9. For example: suppose we have a number 1423, and we want to
find the 9's complement of the number. For this, we subtract each digit of the
number 1423 by 9. So, the 9's complement of the number 1423 is 9999-1423=
8576.
Subtraction using 9's complement :-
With the help of the 9's complement, the process of subtraction is done in a
much easier way. Generally, we subtract the subtrahend from the minuend, but
in a case when we perform subtraction using 9's complement, there is no need to
do the same.
For subtracting two numbers using 9's complement, we first have to find the 9's
complement of the subtrahend and then we will add this complement value with
the minuend. There are two possible cases when we subtract the numbers using
9's complement.
Case 1: When the subtrahend is smaller than the minuend.

R.B.Singh, HOD, Deptt. of BCA, A.S.College, Bikramganj Page 1


For subtracting the smaller number from the larger number using 9's
complement, we will find the 9's complement of the subtrahend, and then we
will add this complement value with the minuend. By adding both these values,
the result will come in the formation of carry. At last, we will add this carry to
the result obtained previously.

Case 2: When the subtrahend is greater than the minuend.


In this case, when we add the complement value and the minuend, the result
will not come in the formation of carry. This indicates that the number is
negative, and for finding the final result, we need to find the 9's complement of
the result.

10's Complement :-
The 10's complement is also used to find the subtraction of the decimal
numbers. The 10's complement of a number is calculatedby subtracting each
digit by 9 and then adding 1 to the result. Simply, by adding 1 to its 9's
complement we can get its 10's complement value. For example: suppose we
have a number 1423, and we want to find the 10's complement of the number.
For this, we find the 9's complement of the number 1423 that is 9999-1423=

R.B.Singh, HOD, Deptt. of BCA, A.S.College, Bikramganj Page 2


8576, and now we will add 1 to the result. So the 10's complement of the
number 1423 is 8576+1=8577.
Subtraction using 10's complement :-
For subtracting two numbers using 10's complement, we first have to find the
10's complement of the subtrahend, and then we will add this complement value
with the minuend. There are two possible cases when we subtract the numbers
using 10's complement.
Case 1: When the subtrahend is smaller than the minuend.
For subtracting the smaller number from the larger number using 10's
complement, we will find the 10's complement of the subtrahend and then we
will add this complement value with the minuend. By adding both these values,
the result will come in the formation of carry. We ignore this carry and the
remaining digits will be the answer.

Case 2: When the subtrahend is greater than the minuend.


In this case, when we add the complement value and the minuend, the result
will not come in the formation of carry. This indicates that the number is
negative and for finding the final result, we need to find the 10's complement of
the result obtained by adding complement value of subtrahend and minuend.

R.B.Singh, HOD, Deptt. of BCA, A.S.College, Bikramganj Page 3


R.B.Singh, HOD, Deptt. of BCA, A.S.College, Bikramganj Page 4

You might also like