Digital Arithmetic
67
Example 3.14
Multiply (37) 10 by (10) 10 using floating-point numbers. Verify by showing equivalent decimal
multiplication.
Solution
• The multiplicand = (37) 10 = (100101) 2 = 0.100101 × 2
6 .
• The multiplier = (10) 10 = (1010) 2 = 0.1010 × 2
4 .
• (37) 10 × (10) 10 = (0.100101 × 0.1010) × 2
10
= 0.0101110010 × 2
10
= 101110010
= (370) 10 and hence is verified.
Example 3.15
Perform (E3B) 16 ÷ (1A) 16 using binary floating-point numbers. Verify by showing equivalent decimal
division.
Solution
• Dividend = (E3B) 16 = (111000111011) 2 = 0.111000111011 × 2
12 .
• Divisor = (1A) 16 = (00011010) 2 = (11010) 2 = 0.11010 × 2
5 .
• Therefore, (E3B) 16 ÷ (1A) 16 = (0.111000111011 ÷ 0.11010) × 2
7 .
• By performing division of the mantissas using either of the two division algorithms described earlier,
we obtain the result of division as (10001100.00011) 2 .
• (10001100.00011) 2 = (140.093) 10 .
• Also, (E3B) 16 = (3643) 10 and (1AA 16 = (26) 10 .
• (E3B) 16 ÷ (1A) 16 = (3643) 10 ÷ (26) 10 = (140.1) 10 , which is the same as the result obtained with
binary floating-point arithmetic to a good approximation.
Review Questions
1. Outline the different steps involved in the addition of larger-bit binary numbers for the following
two cases:
(a) The larger of the two numbers is positive and the other number is negative.
(b) The larger of the two numbers is negative and the other number is positive.
2. Outline the different steps involved in the subtraction of larger-bit binary numbers for the following
two cases:
(a) The minuend is positive. The subtrahend is negative and smaller in magnitude.
(b) The minuend is positive. The subtrahend is negative and larger in magnitude.
3. What decides whether a particular binary addition or subtraction operation would be possible with
2’s complement arithmetic?
4. Why in microprocessors and microcomputers is the ‘repeated add and right-shift’ algorithm preferred
over the ‘repeated left-shift and add’ algorithm for binary multiplication? Briefly outline the
procedure for multiplication in the case of the former.
Précédent

- 88/741

Suivant