Circuits and methods for implementing approximations to logarithms
First Claim
Patent Images
1. A method of approximating a base 2 logarithm of a binary input, the binary input comprised of a first binary number of bits, the method comprising the steps of:
- partitioning the binary input into at least two partitions, each one of said at least two partitions comprised of a second binary number of bits, said second binary number being smaller than said first binary number of bits;
determining a most significant one of said at least two partitions;
determining an integer part of the approximation;
providing as input to a lookup table a binary representation of the bits in said second binary number of bits corresponding to said most significant one of said partitions;
obtaining an output from the lookup table, said output being a binary representation of a mantissa for the logarithm of base 2 of the input to the lookup table;
determining a second most significant one of said at least two partitions;
obtaining a third binary number by appending of portion of a binary representation of the bits in said second binary number of bits corresponding to the partition to the right of the second most significant one of said at least two partitions;
obtaining a residual binary output from shifting said third binary number by a shift determined by said integer portion of the base 2 logarithm of the binary input; and
, adding the residual binary output to the output from the lookup table to obtain the mantissa of the approximation to the base 2 logarithm of the binary input;
whereby in said method a group of steps producing the lookup table output and a group of steps resulting in said residual binary output operate concurrently and there are no dependencies between the two groups of steps.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for approximating a base 2 logarithm of a binary input and the circuit to implement the method are disclosed. The circuit comprises means for determining the integer portion of the logarithm, a lookup table module, a residual function module, an adder module and a register. This circuit performs the approximation in one system clock cycle time.
19 Citations
15 Claims
-
1. A method of approximating a base 2 logarithm of a binary input, the binary input comprised of a first binary number of bits, the method comprising the steps of:
-
partitioning the binary input into at least two partitions, each one of said at least two partitions comprised of a second binary number of bits, said second binary number being smaller than said first binary number of bits;
determining a most significant one of said at least two partitions;
determining an integer part of the approximation;
providing as input to a lookup table a binary representation of the bits in said second binary number of bits corresponding to said most significant one of said partitions;
obtaining an output from the lookup table, said output being a binary representation of a mantissa for the logarithm of base 2 of the input to the lookup table;
determining a second most significant one of said at least two partitions;
obtaining a third binary number by appending of portion of a binary representation of the bits in said second binary number of bits corresponding to the partition to the right of the second most significant one of said at least two partitions;
obtaining a residual binary output from shifting said third binary number by a shift determined by said integer portion of the base 2 logarithm of the binary input; and
,adding the residual binary output to the output from the lookup table to obtain the mantissa of the approximation to the base 2 logarithm of the binary input;
whereby in said method a group of steps producing the lookup table output and a group of steps resulting in said residual binary output operate concurrently and there are no dependencies between the two groups of steps. - View Dependent Claims (2, 3, 4)
-
-
5. A system for approximating a base 2 logarithm of a binary input, the binary input comprised of a first binary number of bits, the binary input capable of being expressed in terms of at least two partitions, said system comprising:
-
means for providing, from the binary input, an integer portion of the base 2 logarithm of said binary input;
a lookup table module receiving the binary input and a most significant part of said integer portion of the base 2 logarithm of the binary input;
a residual function module receiving the binary input and said integer portion of the base 2 logarithm of the binary input;
an adder function module receiving the output of the lookup table and the output of the residual function module and providing an output, said output of said adder function module comprising a mantissa of the approximation to the base 2 logarithm of the binary input; and
,a clocked register receiving the integer portion of the base 2 logarithm of the binary input and the mantissa of the approximation to the base 2 logarithm of the binary input. - View Dependent Claims (6, 7, 8, 9)
-
-
10. A system for approximating a base 2 logarithm of a binary input, the binary input comprised of a first binary number of bits, the system comprising:
-
at least one processing sub-system; and
,at least one computer usable memory having computer readable code embodied therein capable of causing the at least one processing sub-system to;
partition the binary input into at least two partitions, each one of said at least two partitions comprised of a second binary number of bits, said second binary number being smaller than said first binary number of bits;
determine a most significant one of said at least two partitions;
determine an integer part of the approximation;
provide as input to a lookup table a binary representation of the bits in said second binary number of bits corresponding to said most significant one of said partitions;
obtain an output from the lookup table, said output being a binary representation of a mantissa for the logarithm of base 2 of the input to the lookup table;
determine a second most significant one of said at least two partitions;
obtain a third binary number by appending of portion of a binary representation of the bits in said second binary number of bits corresponding to the partition to the right of the second most significant one of said at least two partitions;
obtain a residual binary output from shifting said third binary number by a shift determined by said integer portion of the base 2 logarithm of the binary input; and
,add the residual binary output to the output from the lookup table to obtain the approximation to the mantissa of the base 2 logarithm of the binary input;
wherein the approximation to the base 2 logarithm of the binary input comprises said integer portion and said approximation to the mantissa. - View Dependent Claims (11, 12, 13, 14, 15)
-
Specification