Efficient hardware divide operation
First Claim
1. A method for using the Newton-Raphson technique to perform a division operation within an arithmetic-logic unit (ALU) of a computer system, comprising:
- receiving a numerator a and a denominator b; and
dividing a by b within the ALU by first using the Newton-Raphson technique to find 1/b, and then multiplying 1/b by a to produce the result a/b;
wherein using the Newton-Raphson technique to find 1/b involves obtaining an initial estimate x0 for 1/b and iteratively solving the equation xi+1=xi(2−
bxi) by,using a multiplier circuit to multiply b by xi to compute bxi,performing a bit-wise complement operation on bxi to compute 2−
bxi, whereby an additional pass through an adder circuit or a multiply/add circuit is not required to perform the subtraction operation, andusing the multiplier circuit to multiply xi by 2−
bxi to compute x1(2−
bxi),wherein a separate inverter and a separate multiplexer are attached to each bit position of the multiplier circuit to selectively perform a bit-wise complement or a shift operation during specific passes through the multiplier circuit.
2 Assignments
0 Petitions
Accused Products
Abstract
One embodiment of the present invention provides a system that uses the Newton-Raphson technique to perform a division operation. During operation, the system receives a numerator a and a denominator b. The system then divides a by b by first using the Newton-Raphson technique to calculate 1/b, and then multiplying 1/b by a to produce the result a/b. While using Newton-Raphson technique to find 1/b, the system first obtains an initial estimate x0 for 1/b and then iteratively solves the equation xi+1=xi(2−bxi). Each iteration involves: (1) using a multiplier circuit to multiply b by xi to compute bxi; (2) performing a bit-wise complement operation on bxi to compute 2−bxi, whereby an additional pass through an adder circuit or a multiply/add circuit is not required to perform the subtraction operation. (3) The system then uses the multiplier circuit to multiply xi by 2−bxi to compute xi(2−bxi).
-
Citations
12 Claims
-
1. A method for using the Newton-Raphson technique to perform a division operation within an arithmetic-logic unit (ALU) of a computer system, comprising:
-
receiving a numerator a and a denominator b; and dividing a by b within the ALU by first using the Newton-Raphson technique to find 1/b, and then multiplying 1/b by a to produce the result a/b; wherein using the Newton-Raphson technique to find 1/b involves obtaining an initial estimate x0 for 1/b and iteratively solving the equation xi+1=xi(2−
bxi) by,using a multiplier circuit to multiply b by xi to compute bxi, performing a bit-wise complement operation on bxi to compute 2−
bxi, whereby an additional pass through an adder circuit or a multiply/add circuit is not required to perform the subtraction operation, andusing the multiplier circuit to multiply xi by 2−
bxi to compute x1(2−
bxi),wherein a separate inverter and a separate multiplexer are attached to each bit position of the multiplier circuit to selectively perform a bit-wise complement or a shift operation during specific passes through the multiplier circuit. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. An apparatus that uses the Newton-Raphson technique to perform a division operation, comprising:
-
a receiving mechanism configured to receive a numerator a and a denominator b; and a division mechanism configured to divide a by b by first using the Newton-Raphson technique to find 1/b, and then multiplying 1/b by a to produce the result a/b; wherein while using the Newton-Raphson technique to find 1/b, the division mechanism is configured to obtain an initial estimate x0 for 1/b and to iteratively solve the equation xi+1=xi(2−
bxi);wherein while iteratively solving the equation xi+1=xi(2−
bxi), the division mechanism is configured to,use a multiplier circuit to multiply b by xi to compute bxi, perform a bit-wise complement operation on bxi to compute 2−
bxi, whereby an additional pass through an adder circuit or a multiply/add circuit is not required to perform the subtraction operation, and touse the multiplier circuit to multiply xi by 2−
bxi to compute xi(2−
bxi),wherein a separate inverter and a separate multiplexer are attached to each bit position of the multiplier circuit to selectively perform a bit-wise complement or a shift operation during specific passes through the multiplier circuit. - View Dependent Claims (8, 9, 10, 11, 12)
-
Specification