64
Digital Electronics
Table 3.8 Example 3.10.
Quotient
1 0 0
0 1 1 Dividend
−1 0 0
Divisor
1
0 0 0
No borrow
0 0 0 0
Next MSB appended
−1 0 0
0
1 0 0
Borrow exists
+1 0 0
0 0 0
Final carry ignored
0 0 0 1
Next MSB appended
−1 0 0
0
1 0 1
Borrow exists
+ 1 0 0
0 0 1
Final carry ignored
0 0 1 1
Next MSB appended
− 1 0 0
0
1 1 1
Borrow exists
+1 0 0
0 1 1
Final carry ignored
0 1 1 0
‘0’ appended
− 1 0 0
1
0 1 0
No borrow
0 1 0 0
‘0’ appended
−1 0 0
1
0 0 0
No borrow
• The 16’s complement of (AF) 16 = (51) 16 .
• The binary equivalent of (51) 16 = 01010001 = 1010001.
• The divisor = (09) 16 .
• It is a positive number.
• The binary equivalent of (09) 16 = 00001001.
• As the dividend is a negative number and the divisor a positive number, the quotient will be a
negative number. The division process using the ‘repeated right-shift and subtract’ algorithm is
given in Table 3.9.
• The quotient = 1001 = (09) 16 .
• As the quotient should be a negative number, its magnitude is given by the 16’s complement of
(09) 16 , i.e. (F7) 16 .
• Therefore, (AF) 16 divided by (09) 16 gives (F7) 16 .
3.7 Floating-Point Arithmetic
Before performing arithmetic operations on floating-point numbers, it is necessary to make a few checks,
such as finding the signs of the two mantissas, checking any possible misalignment of exponents, etc.
Précédent

- 85/741

Suivant