Digital Arithmetic
53
higher bit position having a ‘1’. As an example, let us go through different steps of subtracting (1001) 2
from (1100) 2 .
In this case, ‘1’ is borrowed from the second MSB position, leaving a ‘0’ in that position. The
borrow is first brought to the third MSB position to make it ‘10’. Out of ‘10’ in this position,
‘1’ is taken to the LSB position to make ‘10’ there, leaving a ‘1’ in the third MSB position.
10 − 1 in the LSB column gives ‘1’, 1 − 0 in the third MSB column gives ‘1’, 0 − 0 in the second
MSB column gives ‘0’ and 1 − 1 in the MSB also gives ‘0’ to complete subtraction. Subtraction
of mixed numbers is also done in the same manner. The above-mentioned steps are summarized
as follows:
1. 1 1 0 0
2. 1 1 0 0
1 0 0 1
1 0 0 1
1
1 1
3. 1 1 0 0
4. 1 1 0 0
1 0 0 1
1 0 0 1
0 1 1
0 0 1 1
3.3.1 Subtraction Using 2’s Complement Arithmetic
Subtraction is similar to addition. Adding 2’s complement of the subtrahend to the minuend and
disregarding the carry, if any, achieves subtraction. The process is illustrated by considering six
different cases:
1. Both minuend and subtrahend are positive. The subtrahend is the smaller of the two.
2. Both minuend and subtrahend are positive. The subtrahend is the larger of the two.
3. The minuend is positive. The subtrahend is negative and smaller in magnitude.
4. The minuend is positive. The subtrahend is negative and greater in magnitude.
5. Both minuend and subtrahend are negative. The minuend is the smaller of the two.
6. Both minuend and subtrahend are negative. The minuend is the larger of the two.
Case 1
• Let us subtract +14 from +24.
• The 2’s complement representation of +24 = 00011000.
• The 2’s complement representation of +14 = 00001110.
• Now, the 2’s complement of the subtrahend (i.e. +14) is 11110010.
• Therefore, +24 − (+14) is given by
00011000
+ 11110010
00001010
with the final carry disregarded.
• The decimal equivalent of (00001010) 2 is +10, which is the correct answer.
Précédent

- 74/741

Suivant