CN1462937A - Method of obtaining root with more bits by using processor with fewer bits - Google Patents

Method of obtaining root with more bits by using processor with fewer bits Download PDF

Info

Publication number
CN1462937A
CN1462937A CN 02121907 CN02121907A CN1462937A CN 1462937 A CN1462937 A CN 1462937A CN 02121907 CN02121907 CN 02121907 CN 02121907 A CN02121907 A CN 02121907A CN 1462937 A CN1462937 A CN 1462937A
Authority
CN
China
Prior art keywords
root
value
ask
bit processor
multidigit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 02121907
Other languages
Chinese (zh)
Other versions
CN1296816C (en
Inventor
吴声宏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Winbond Electronics Corp
Original Assignee
Winbond Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Winbond Electronics Corp filed Critical Winbond Electronics Corp
Priority to CNB021219079A priority Critical patent/CN1296816C/en
Publication of CN1462937A publication Critical patent/CN1462937A/en
Application granted granted Critical
Publication of CN1296816C publication Critical patent/CN1296816C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

A method for finding out root by using the microprocessor with less bits as that with more bits features that the root is divided into front half A and back half B, a binary approximation method is used to quickly obtain A value, and the B value is found out through assuming B=O, putting it in the iterative equation, recursive operating about 3 times and convergence. Its advantage is high speed.

Description

Ask the method for root as multidigit with few bit processor
Technical field
The present invention relates to a kind of method of asking root with few bit processor as multidigit, especially refer to a kind of root of asking that carries out 16 or 32 with few bit processor (as: 8 bit processor), the method is to be different from conventional operation method of successive division consuming time or two fens approach methods, use that simple two steps are tried to achieve A, B two separates, a kind of method person that can obtain multidigit root value more quickly is provided.
Background technology
In related application such as 8 bit processors (as: INTEL8051 processor), root is indispensable demand, tradition is tried to achieve the mode of evolution root, general for to finish by method of successive division or two fens approximatiosses, yet method of successive division is for carrying out repeatedly the computing action of data shift (SHIFTING), cause operation comparatively consuming time, and two fens approximatiosses, also be subjected to processor 8 events are only arranged, carry out computing again after data allocations must being reassembled into 16, operation problem comparatively consuming time is arranged equally, so occasion in (REAL TIME) computing in real time, as: the computing aspect of CD/DVD track, cause system performance to reduce easily or deterioration, and industry overcomes this problem for reaching, then generally use look-up table (LOOK UP TABLE), this lookup table mode is because quite direct, need not any calculation step, though can't obtain the most accurate value, but still belong to good in the practical application, right its shortcoming is: must take more internal memory (using for storing form), this measure, follow for the CD/DVD CD-ROM drive in the application of rail (TRACKING), owing to must differentiate general CD sheet, individual layer (SINGLE LAYER), under the discs that DVD sheet and bilayer (DOUBLE LAYER) DVD sheet etc. are three types, must use three list data beginnings to finish, truly have the problem of excess waste memory headroom.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of and asks the method for root with few bit processor as multidigit, only need carry out the simple division arithmetic that approached computing and less number of times in two minutes, can obtain separating behind the root apace.
Of the present invention time a purpose is to provide a kind of method of asking root with few bit processor as multidigit, 32 bit data are asked the occasion of root with 8 bit processors, at most only need three circulation division arithmetics can obtain actual value, be applied to the calculating aspect of CD/DVD track, transport step for repeatedly removing of more traditional method of successive division and have more the timesaving advantage.
Another object of the present invention is to provide a kind of method of asking root with few bit processor as multidigit, divide into two sections of front and back for asking separating of root, preceding half section is to use simple two minutes approximatiosses to obtain the A value, again in the hope of the iterative formula of second half section B value, by B=0,1,2 .... beginning, carry out maximum three times recurrence and handle, can restrain value, constitute a kind of method person that can try to achieve multidigit root value more quickly with acquisition B.
The object of the present invention is achieved like this:
The invention discloses and a kind ofly ask the method for root with few bit processor as multidigit, its step comprises:
To wait to ask the root value be a round values c and a numerical value d less than the 2K position who comprises a 2K position in one order, and the step of the result behind the root for representing less than the numerical value b of K position with the round values a of a K position and;
The multiplying of the few bit processor of one utilization is handled, and with two fens approximatiosses, obtains base value (floor) or minimum value after c opens radical sign, and obtains the step of a value according to this;
One rearranges aforementioned formula, is converted to the step corresponding to the iterative formula of b;
One makes the b value be begun by a particular value, in the aforementioned iterative formula of substitution, handles by the division recursive operation of few bit processor, till the formula convergence, tries to achieve the step of b value according to this;
Owing to obtain in the step of base value that c opens radical sign, only need lack a multiplying gets final product, and the convergence of iterative formula, more can several times the circulation (maximum three times) division arithmetic can finish, exempt the calculation step than multilayer of traditional method of successive division, constitute a kind of method that can obtain the evolution root more quickly.
Be further to understand feature of the present invention and other purpose, conjunction with figs. and describe in detail as after.
Description of drawings
Fig. 1 is a method step synoptic diagram of the present invention.
Embodiment
At first, establish and treat that the evolution radical is: c * 2 2K+ d and c, d<2 2k
According to c * 2 2K+ d=(a * 2 K+ b) 2, desiring to try to achieve a, b two separates (a, b<2 k):
Earlier with (a * 2 K+ b) 2After the expansion be:
(a×2 K+b) 2=(a 2×2 2k+a×2 k+1b+b 2)=c×2 2K+d…..…(1)
Therefore, c * 2 2K<(a * 2 K+ b) 2<((a+1) * 2 K) 2(∵ b<2 k) ... (2)
By learning a in aforementioned (1) 2<c is by knowing c<(a+1) in (2) formula 2
So obtain: a 2<c<(a+1) 2So: a < c < a + 1
So the value of a can be directly be opened radical sign and get its minimum value or base value (floor) gets final product c,
That is a = floor ( c ) &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; &CenterDot; ( 4 )
In aforementioned (4) formula, c is opened in the step of radical sign, can directly adopt two fens approximatiosses, obtain one and meet a 2Maximal value under the<c condition (a) gets final product.
In the above-mentioned steps, obtained the preceding half section value of root, the value of second half section then can by:
(1) formula rearranged and form an equation of obtaining the b value:
b=(c×2 2K+d-a 2×2 2k-b 2)/a×2 k+1
=(c-a 2)×2 2k+(d-b 2)/a×2 k+1
Be converted under the iterative formula and be:
b [n]=(c-a 2)×2 2k+(d-b [n-1] 2)/a×2 k+1…………………..(5)
And at first suppose b=0, the substitution formula is tried to achieve a b in (5) [0]Value is again with this b [0]Carry out with recursive fashion again, and through the confirmation of experiment, can be after the recurrence second time iterate, i.e. Bearberry Extract, the value that present in this moment is actual b value, learns through the Digital Simulation mode, (for example: 32 root) only need carry out can obtaining for three times the result.
Aforementioned for explaining derivation mode of the present invention, the actual step flow process is for as shown in Figure 1, that is the method for root of the present invention, general is with a, b two separates and is distinguished into two and partly carries out respectively, obtain a value (step 11) by c being opened radical sign and getting its minimum value earlier, afterwards, for obtaining the step of b value, in step (12), for setting a cycle index (n), set n=m in this example, this m value (period) is set at 3 times and gets final product, then in 32 root example, in step (13), the initial value that makes b is zero, carries out computing in the iterative formula of trying to achieve b value with this initial value substitution step (14) again and obtains a b value, next, successively decrease in cycle index (when step 15) and cycle index (n) are not equal to zero (step 16), then repeat the processing that iterates of formula, as described above, after carrying out three recursion cycle processing, be the end process process, and a that obtain this moment, the b value be the answer of the root desiring to ask.
And by the processor operation, if calculate the occasion of 32 roots (16) with 8 bit processors, this step (11) is opened in the step of radical sign to c, can be via two fens approximatiosses (multiplying) (8 * 8 bit arithmetic), get final product less than a square number of the maximum of c to obtain numerical value, only need the multiplying cycle once, can obtain the result fast, and carry out the division arithmetic of step (14) at every turn, only be all need one time 16 divided by 8 division arithmetic, aforementioned must carrying out under three division operations, then need three execution cycles,, then only need four execution cycles to reach altogether so the execution cycle that the aforementioned a of obtaining value is spent adds three division arithmetic cycles, and the comparison of operation time of the present invention and traditional approach, can be referring to shown in the following chart.
Method Multiplying Division arithmetic Total operation times
The present invention 1 computing (8bit * 8bit) 1 computing, 3 circulations (16bit/8bit) 1+3=4
Method of successive division 2 computings, 2 circulations (32bit/16bit) 4
Two fens approximatiosses 4 computings, 2 circulations (16bit * 16bit) 8
When if approximatioss was implemented with traditional two minutes, need carry out 16 * 16 multiplying, need carry out secondary cycle and need four execution cycles (totally 8 execution cycles) at every turn, and known method of successive division is implemented down, owing to adopt 32 divided by 16 division operation, then need carry out twice circulation and expend two execution cycles (totally four execution cycles) at every turn, though this method of successive division and operating efficiency of the present invention are identical, so only be one embodiment, so for the real-time computing aspect of the mass data of CD/DVD track, the loop number of aforementioned method of successive division is more than 2 times, and loop number of the present invention all maintains three times, provable thus this case has the advantage that obtains fast and shorten operation time, in addition, add for more necessary, subtract, take advantage of, remove the occasion that waits computing, also included in the method for the present invention, if with under the environment that uses 8051 processors, the present invention can reduce for 20% processing time.
So as can be known with above stated specification, the present invention is based under the operation of traditional method of successive division and the two fens approximatiosses defective comparatively consuming time, and provide a kind of separating of root divided into partly processing respectively of front and back two, the a value is obtained with simple two minutes approximatiosses in the first part, the circular treatment of carrying out several times with b value iterative formula can rake in the b value again, because total processing cycle only needs a multiplication and three division cycles to get final product, and really has the benefit that shortens the processing time.

Claims (9)

1. ask the method for root with few bit processor as multidigit for one kind, it is characterized in that, with the processor of K figure place, the data of 2K figure place are at least carried out the root operation, the step of its execution comprises:
One makes pending data comprise the step that the round values c and of a 2K position represents less than the numerical value d of 2K position;
A pair of K bit processor is carried out the multiplication operation, to obtain the step of this round values c being opened the round values a of the minimum value behind the radical sign;
One makes numerical value b be begun by an initial value, carries out the operation of several division with the K bit processor, till the b value is convergence state, obtains the step of final b value; And
Represent the round values of K position and the result that b represents to become less than the combinations of values of K position a pair of 2K bit data root processing with a.
2. as claimed in claim 1ly ask the method for root as multidigit, it is characterized in that described two minutes approximatiosses are a square number that obtains less than the maximum of c value with few bit processor.
3. as claimed in claim 1ly ask the method for root as multidigit, it is characterized in that the initial value of described b is 0 with few bit processor.
4. as claimed in claim 1ly ask the method for root as multidigit, it is characterized in that the number of times that described recurrence is implemented is three times with few bit processor.
5. as claimed in claim 1ly ask the method for root as multidigit, it is characterized in that described multiplication operation is two fens approximatiosses with few bit processor.
6. ask the method for root with few bit processor as multidigit for one kind, it is characterized in that, with the processor of K position, the data of 2K position are at least carried out the root operation, the step of its execution comprises:
One makes pending data comprise the step that the round values c and of a 2K position represents less than the numerical value d of 2K position;
A pair of separating of desiring to ask divided into front and back two partly, and the step of handling respectively;
One at leading portion partly, and the few bit processor of utilization is directly obtained an a value to the c root with getting its minimum value;
One at back segment partly, and aforementioned root data and the net result treated is converted to another expression, begun by an initial value with a b value, carries out the operation of several recurrence with few bit processor, till the convergence of b value, tries to achieve the step of b value according to this; And
Represent a K position and the numerical value less than the K position respectively by a and b two numerical value, and be combined into the result that one-to-many bit data root is handled.
7. as claimed in claim 6ly ask the method for root with few bit processor as multidigit, it is characterized in that, described leading portion is partly for using two fens approximatiosses to obtain a square number less than the maximum of c value.
8. as claimed in claim 6ly ask the method for root as multidigit, it is characterized in that the initial value of described b is 0 with few bit processor.
9. as claimed in claim 6ly ask the method for root as multidigit, it is characterized in that the number of times that described recurrence is implemented is three times with few bit processor.
CNB021219079A 2002-05-27 2002-05-27 Method of obtaining root with more bits by using processor with fewer bits Expired - Fee Related CN1296816C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021219079A CN1296816C (en) 2002-05-27 2002-05-27 Method of obtaining root with more bits by using processor with fewer bits

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021219079A CN1296816C (en) 2002-05-27 2002-05-27 Method of obtaining root with more bits by using processor with fewer bits

Publications (2)

Publication Number Publication Date
CN1462937A true CN1462937A (en) 2003-12-24
CN1296816C CN1296816C (en) 2007-01-24

Family

ID=29743078

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021219079A Expired - Fee Related CN1296816C (en) 2002-05-27 2002-05-27 Method of obtaining root with more bits by using processor with fewer bits

Country Status (1)

Country Link
CN (1) CN1296816C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179894A (en) * 2016-03-09 2017-09-19 瑞昱半导体股份有限公司 Fast divider and rapid division method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5768170A (en) * 1996-07-25 1998-06-16 Motorola Inc. Method and apparatus for performing microprocessor integer division operations using floating point hardware
US6163791A (en) * 1998-02-02 2000-12-19 International Business Machines Corporation High accuracy estimates of elementary functions
US6349319B1 (en) * 1999-01-29 2002-02-19 Sun Microsystems, Inc. Floating point square root and reciprocal square root computation unit in a processor

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179894A (en) * 2016-03-09 2017-09-19 瑞昱半导体股份有限公司 Fast divider and rapid division method
CN107179894B (en) * 2016-03-09 2021-08-27 瑞昱半导体股份有限公司 Fast divider and fast division operation method

Also Published As

Publication number Publication date
CN1296816C (en) 2007-01-24

Similar Documents

Publication Publication Date Title
JP2710928B2 (en) High-speed cosine transform sequence calculation circuit
EP0660247B1 (en) Method and apparatus for performing discrete cosine transform and its inverse
JPS58169675A (en) Monolithic type high speed fourier transform circuit
DE1549584B2 (en) Data processing system
Hsu et al. A cell mapping method for nonlinear deterministic and stochastic systems—part I: the method of analysis
Rutherford et al. The implementation of fuzzy algorithms for control
US6317770B1 (en) High speed digital signal processor
CN1462937A (en) Method of obtaining root with more bits by using processor with fewer bits
Bhargava et al. The proportion of genus one curves over ℚ defined by a binary quartic that everywhere locally have a point
DE60316342T2 (en) MULTIPLIER WITH ADDENDUM TABLES
CN111797985A (en) Convolution operation memory access optimization method based on GPU
US6938064B1 (en) Method for computing fast Fourier transform and inverse fast Fourier transform
CA2055900C (en) Binary tree multiplier constructed of carry save adders having an area efficient floor plan
US6622154B1 (en) Alternate booth partial product generation for a hardware multiplier
US5715187A (en) Method and apparatus for integer multiplication
US6438568B1 (en) Method and apparatus for optimizing conversion of input data to output data
JP3046115B2 (en) Discrete cosine transformer
Drahoš et al. Logarithmic addition and subtraction for embedded control systems
Lloyd Spectral addition techniques for the synthesis of multivariable logic networks
JP2958968B2 (en) Discrete cosine arithmetic unit
Fialko et al. A sparse direct multi-frontal solver in SCAD software
CN117640075A (en) Data processing method and related equipment based on quantum optimization algorithm
US20220108159A1 (en) Crossbar array apparatuses based on compressed-truncated singular value decomposition (c- tsvd) and analog multiply-accumulate (mac) operation methods using the same
RU2239867C2 (en) Device, methods and software for determining function coefficients with decreased delay
JPH07152729A (en) Digital arithmetic circuit

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee