66
Digital Electronics
quotient is given by the division of the two mantissas (i.e. dividend mantissa divided by divisor
mantissa) and the exponent of the quotient is given by subtraction of the two exponents (i.e. dividend
exponent minus divisor exponent).
If
N 1 = m 1 × 2
e1 and N 2 = m 2 × 2
e2
then
N 1 × N 2 = m 1 × m 2 × 2
e1+e2
and
N 1 /N 2 = m 1 /m 2 × 2
e1−e2
Again, post-normalization may be required after multiplication or division, as in the case of addition
and subtraction operations.
Example 3.12
Add (a) (39) 10 and (19) 10 and (b) (1E) 16 and (F3) 16 using floating-point numbers. Verify the answers
by performing equivalent decimal addition.
Solution
(a) (39) 10 = 100111 = 0.100111 × 2
6 .
(19) 10 = 10011 = 0.10011 × 2
5
= 0.010011 × 2
6 .
Therefore, (39) 10 + (19) 10 = 0.100111 × 2
6
+ 0.010011 × 2
6
= (0.100111 + 0.010011) × 2
6
= 0.111010 × 2
6
= 111010 = (58) 10
and hence is verified.
(b) (1EE 16 = (00011110) 2 = 0.00011110 × 2
8 .
(F 3) 16 = (11110011) 2 = 0.11110011 × 2
8 .
(1EE 16 + F 3) 16 = (0.00011110 + 0.11110011) × 2
8
= 100010001
= 000100010001
= (111) 16 .
Also, (1EE 16 + (F3) 16 = (111) 16 and hence is proved.
Example 3.13
Subtract (17) 8 from (21) 8 using floating-point numbers and verify the answer.
Solution
• (21) 8 = (010001) 2 = 0.010001 × 2
6 .
• (17) 8 = (001111) 2 = 0.001111 × 2
6 .
• Therefore, (21) 8 − (17) 8 = (0.010001 − 0.001111) × 2
6
= 0.000010 × 2
6
= 000010 = (02) 8 .
• Also, (21) 8 − (17) 8 = (02) 8 and hence is verified.
Précédent

- 87/741

Suivant