Subtraction by 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

SUBTRACTION by 2’s Complement

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


1. At first, 2’s complement of the subtrahend is found.
2. Then it is added to the minuend.
3. If the final carry-over of the sum is 1, it is dropped and the result is positive.
4. If there is no carry over, the two’s complement of the sum will be the result and it is negative.

Evaluate:
1. 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 results in:
1 10110 Minuend
1 01010 2’s complement of subtrahend
Carry over 1 1 00000 Result of addition
After dropping the carry-over we get the result of subtraction to be 100000.

2. 10110 – 11010
Solution:
2’s complement of 11010 is (00101 + 1) i.e. 00110. Hence
Minued 10110
2’s complement of subtrahend 00110
Result of addition 11100
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.

3. (iii) 1010.11 – 1001.01


Solution:
2’s complement of 1001.01 is 0110.11. Hence
Minued 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.

4. (iv) 10100.01 – 11011.10


Solution:
2’s complement of 11011.10 is 00100.10. Hence
Minued 10100.01
2’s complement of subtrahend 01100.10
Result of addition 11000.11
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.
SUBTRACTION by 1’s Complement

The steps to be followed in subtraction by 1’s complement are:


1. To write down 1’s complement of the subtrahend.
2. To add this with the minuend.
3. If the result of addition has a carry-over then it is dropped and an 1 is added in the last bit.
4. If there is no carry over, then 1’s complement of the result of addition is obtained to get the final result
and it is negative.
Evaluate:
1. 110101 – 100101
Solution:
1’s complement of 10011 is 011010. Hence
Minued - 110101
1’s complement of subtrahend - 011010
Carry over - 1 001111
1
010000
The required difference is 10000

2. (ii) 101011 – 111001


Solution:
1’s complement of 111001 is 000110. Hence
Minued - 101011
1’s complement - 000110
110001
Hence the difference is – 1 1 1 0

3. (iii) 1011.001 – 110.10


Solution:
1’s complement of 0110.100 is 1001.011 Hence
Minued - 1011.001
1’s complement of subtrahend - 1001.011
Carry over - 1 0100.100
1
0100.101
Hence the required difference is 100.101

(iv) 10110.01 – 11010.10


Solution:
1’s complement of 11010.10 is 00101.01
10110.01
00101.01
11011.10
Hence the required difference is – 00100.01 i.e. – 100.01
 9`s Complement and 10`s Complement

The 9`s complement of decimal number can be obtained by subtracting each digit of the number from 9.

For example, the 9`s complement of 3 is 6 (9-3=6), and 234 is 765 (999-234 =765).

The 10`s complement of decimal number can be obtained by adding 1 to the least significant digit of 9`s
complement of that number. For example, 10`s complement of 3 is 7 (9-3=6+1=7), and 123 is 877.

Subtraction of decimal number using 9`s complement

Here are the steps are given below:

1. Make the both numbers having the same number of digits.


2. Determine the 9`s complement of the number from which we subtracted (subtrahend).
3. Add the 9`s complement to the given number from which we subtract (minuend).
4. If there exists` any additional digit (carry) in the result after addition, remove it and add it to the
complement of the result and prefix by a negative sign to get the final result.

E.g. Subtract (123)10 From (345)10


9`s complement of 123= (999 -123) =876
Adding the 9`s complement with 345, i.e 345 + 876 = 1221

In the result, most significant digit 1 is the carryover. So add this carry over to remaining digits 221
i.e, 221 + 1 = 222
Hence, (222)10 is the required result after subtracting (123)10 from (345)10.

Subtraction using 10`s complement:

Here are the steps are given below:

1. Make the both numbers having same numbers of digits.


2. Determine the 10`s complement of the number to be subtracted (subtrahend).
3. Add the 10`s complement to the given number from which we subtract (minuend).
4. If there exists` any additional digit (carry) in the result after addition, remove it from the result and the
remaining digits form the final result.
5. If there exists` no any carry then determine the 10`s complement of the result and prefix by the negative
sign to get the final result.

Example: Subtract (123)10 from (345)10

10`s Complement of 123 = (999 - 123) = 876 + 1 = 877


Adding the 10`s complement with 345, i.e. 345 + 877 = 1222
In this result, most significant digit 1 is the carry over. So remove it to find the result.
Therefore, (222)10 is the required result.
1. Convert the decimal number 151.75 to binary.

1. 11010011.01
2. 10000111.11
3. 00111100.00
4. 10010111.11
2. Convert the binary number 1011010 to hexadecimal.
1. 5A
2. 5F
3. 5C
4. 5B
3. The weight of the LSB as a binary number is:
1. 2
2. 1
3. 4
4. 3
4. The number of bits used to store a BCD digit is:
1. 8
2. 1
3. 4
4. 2
5. Base 10 refers to which number system?
1. decimal
2. hexadecimal
3. octal
4. binary coded decimal
6. Convert the binary number 1001.0010 to decimal.
1. 12.5
2. 90.125
3. 125
4. 9.125
7. What is the decimal value of the hexadecimal number 777?
1. 19
2. 1911
3. 191
4. 19111
8. What is the resultant binary of the decimal problem 49 + 1 = ?
1. 01010101
2. 00110101
3. 00110010
4. 00110001
9. 3428 is the decimal value for which of the following binary coded decimal (BCD) groupings?
1. 11010001001000
2. 11010000101000
3. 011010010000010
4. 110100001101010
10. What is the result when a decimal 5238 is converted to base 16?
1. 1388
2. 12166
3. 1476
4. 327.375
11. Convert the binary number 1001.00102 to decimal.
A. 90.125
B. 9.125
C. 125
D. 12.5
19.
12. How many binary digits are required to count to 10010?
A. 7
B. 2
C. 3
D. 100
13. The BCD number for decimal 347 is ________.
A. 1100 1011 1000
B. 0011 0100 0111
C. 0011 0100 0001
D. 1100 1011 0110
21.
14. The binary number for octal 458 is ________.
A. 100010
B. 100101
C. 110101
D. 100100
22.
15. The sum of 11101 + 10111 equals ________.
A. 110011
B. 100001
C. 110100
D. 100100
40.
16. Convert binary 11001111 to hexadecimal.
A. 8F16
B. CE16
C. DF16
D. CF16
43.
17. Hexadecimal letters A through F are used for decimal equivalent values from:
A. 1 through 6
B. 9 through 14
C. 10 through 15
D. 11 through 17
48.
18. What is the resultant binary of the decimal problem 49 + 01 = ?
A. 01010101
B. 00110101
C. 00110010
D. 00110001

You might also like