Digital Arithmetic
63
Table 3.7 Example 3.9.
Quotient
First step
1
1 1 0 1 0 1
Dividend
−1 0 1 1
Divisor
0 0 1 0
First subtraction
Second step
0
0 0 1 0 0
Next MSB appended
−1 0 1 1
Divisor right shifted
Third step
0
0 0 1 0 0 1
Next MSB appended
−1 0 1 1
Divisor right shifted
0 0 1 0 0 1
All bits exhausted
1
0 0 1 0 0 1 0
‘0’ appended
−1 0 1 1
Divisor right shifted
0 1 1 1
Second subtraction
Fourth step
1
0 1 1 1 0
‘0’ appended
−1 0 1 1
Divisor right shifted
0 0 0 1 1
Third subtraction
Fifth step
0
0 0 0 1 1 0
‘0’ appended
−1 0 1 1
Divisor right shifted
0 0 1 1
Fourth subtraction
Example 3.10
Use the ‘repeated subtract and left-shift’ algorithm to divide (100011) 2 by (100) 2 to determine both the
integer and fractional parts of the quotient. Verify the result by showing equivalent decimal division.
Determine the fractional part to two bit places.
Solution
The sequence of operations is given in Table 3.8. The operations are self-explanatory.
• The quotient = (1000.11) 2 = (8.75) 10 .
• Now, (100011) 2 = (35) 10 and (100) 2 = (4) 10 .
• (35) 10 divided by (4) 10 gives (8.75) 10 and hence is verified.
Example 3.11
Divide (AF) 16 by (09) 16 using the method of ‘repeated right shift and subtract’, bearing in mind the
signs of the given numbers, assuming that we are working in eight-bit 2’s complement arithmetic.
Solution
• The dividend = (AF) 16 .
• As it is a negative hexadecimal number, the magnitude of this number is determined by its 2’s
complement (or more precisely by its 16’s complement in hexadecimal number language).
63
Table 3.7 Example 3.9.
Quotient
First step
1
1 1 0 1 0 1
Dividend
−1 0 1 1
Divisor
0 0 1 0
First subtraction
Second step
0
0 0 1 0 0
Next MSB appended
−1 0 1 1
Divisor right shifted
Third step
0
0 0 1 0 0 1
Next MSB appended
−1 0 1 1
Divisor right shifted
0 0 1 0 0 1
All bits exhausted
1
0 0 1 0 0 1 0
‘0’ appended
−1 0 1 1
Divisor right shifted
0 1 1 1
Second subtraction
Fourth step
1
0 1 1 1 0
‘0’ appended
−1 0 1 1
Divisor right shifted
0 0 0 1 1
Third subtraction
Fifth step
0
0 0 0 1 1 0
‘0’ appended
−1 0 1 1
Divisor right shifted
0 0 1 1
Fourth subtraction
Example 3.10
Use the ‘repeated subtract and left-shift’ algorithm to divide (100011) 2 by (100) 2 to determine both the
integer and fractional parts of the quotient. Verify the result by showing equivalent decimal division.
Determine the fractional part to two bit places.
Solution
The sequence of operations is given in Table 3.8. The operations are self-explanatory.
• The quotient = (1000.11) 2 = (8.75) 10 .
• Now, (100011) 2 = (35) 10 and (100) 2 = (4) 10 .
• (35) 10 divided by (4) 10 gives (8.75) 10 and hence is verified.
Example 3.11
Divide (AF) 16 by (09) 16 using the method of ‘repeated right shift and subtract’, bearing in mind the
signs of the given numbers, assuming that we are working in eight-bit 2’s complement arithmetic.
Solution
• The dividend = (AF) 16 .
• As it is a negative hexadecimal number, the magnitude of this number is determined by its 2’s
complement (or more precisely by its 16’s complement in hexadecimal number language).
