Information Technology Reference
In-Depth Information
Divisor (D)
Add
(n
+
1)-bit Adder
Control Logic
Shift Left
Register A
Dividend (X)
C
Figure 4.10 Binary division structure
Example
Consider the division of a dividend X
¼
8
(1000) and a divisor
¼
D
¼
(0011) using the non-restoring algorithm. The process is illustrated in
the following table.
3
¼
=
;
Initially
0
0
0
0
0
1
0
0
0
0
0
0
1
1
Shift
0
0
0
0
1
0
0
0
First cycle
Subtract
1
1
1
0
1
Set x
0
1
1
1
0
0
0
0
0
)
Second cycle
Shift
1
1
1
0
0
0
0
0
dd
0
0
0
1
1
Set x
0
1
1
1
1
1
0
0
0
0
)
Third cycle
Shift
1
1
1
1
0
0
0
0
dd
0
0
0
1
1
Set x
0
0
0
0
0
1
0
0
0
1
)
Fourth cycle
Shift
0
0
0
1
0
0
0
1
Subtract
1
1
1
0
1
Set x
0
1
1
1
1
1
0
0
1
0
|
{z
}
Quotient
)
Restore remainder
dd
1
1
1
1
1
0
0
0
1
1
0
0
0
1
0
Remainder
|
{z
}
4.3. FLOATING-POINT ARITHMETIC
Having considered integer representation and arithmetic, we consider in this section
floating-point representation and arithmetic.
4.3.1. Floating-Point Representation (Scientific Notation)
+
m
b
e
,
where m, called the mantissa, represents the fraction part of the number and is
A floating-point (FP) number can be represented in the following form:
Search WWH ::
Custom Search