Page 13 - DCAP104_EXPOSURE_TO_COMPUTER_DISCPLINES
P. 13
Exposure to Computer Disciplines
Notes 1 Find the 9’s complement and 10’s complement for the decimal .
number 256.
Solution
9’s complement: The 9’s complement is obtained by subtracting
each digit of the number from 9 (the highest digit value). Similarly,
for obtaining 1’s complement for a binary number we have to
subtract each binary digit of the number from the digit 1 in the
same manner.
2 9’s complement of 256
Solution
10’s complement: adding 1 in the 9’s complement produces the
10’s con11
10’s complement of 256 = 743+ 1= 74.4
Please note on adding the number and its 9’s complement we get
999 (for this three digit numbers) while on adding the number and
its 10’s complement we get 1000.
3 Find 1’s and 2’s complement of 10 10.
Solution 1’s complement: The 1’s complement of 101 0 is
The number is 1 0 I 0
The 1’s complement is 0 1 0 1
Please note that wherever you have a digit 1 in number the
complement contains 0 for that digit and vice versa. In other words
to obtain 1’s complement of a binary number, we only have to
change all the 1’s of the number to 0 and all the zeros to 1’s. This
can be done by complementing each bit.
2’s complement: adding 1 in 1’s complement will generate the 2’s
complement
6 LOVELY PROFESSIONAL UNIVERSITY