Patent Publication Number: US-5297072-A

Title: Square-root operating circuit adapted to perform a square-root at high speed and apply to both of binary signal and quadruple signal

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a numerical-value operating circuit adaptively used for computers such as a personal computer and a workstation, and more particularly to a square-root operating circuit applied to a built-in numerical value operating circuit such as a digital signal processor and a microprocessor. 
     2. Description of the Related Art 
     Presently digital information processing such as in a computer field speeds up increasingly. When performing signal processing or information processing, speeding up of a square-root operation is required, because numerous square roots are used in the field of numerical value calculation. 
     In this field, it is known such a technology that necessary square roots are obtained by repetitively performing an addition and a substraction with respect to minuends and augends, thereby it has difficulty in enhancing the speed of the square-root operation. Consequently, speeding up of the numerical-value operation in the information processing field has been considered difficult. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide a square-root operating circuit adapter to perform a square-root at high speed and apply to both of a binary signal and a quadruple signal. 
     The object of the present invention can be achieved by a square-root operating circuit adapted to perform a square-root at high speed and apply to both of a binary signal and a quadruple signal includes a unit for performing a square of an input signal, the performing unit being arranged to perform the square of a candidate square root of any one of an originally quadruple logic input signal and a quadruple logic input signal converted from a binary logic, and a unit for comparing the input signal with a square of a candidate square root at each digit and for outputting a result of the comparison so as to discriminate a proper digit of the square root. 
     The performing unit includes an equivalent circuit for inputting the input signal and for outputting an equivalent signal having an equivalent value which corresponds to the input signal, a first logic circuit connected to the equivalent circuit for performing a logical product of the equivalent signal output from the equivalent circuit with a logical product of the equivalent signal having a different equivalent value and for outputting a signal corresponding to a result of the logical product, a second logic circuit connected to the first logic circuit for performing a logical sum of the signal output from the first logic circuit r67 for outputting a signal corresponding to a result of the logical sum, a delay circuit connected to the second logic circuit for delaying a specific signal output from the second logic circuit and for outputting the delayed signal, and a logic gate unit connected to the second logic circuit for performing a logical sum of another specific signal output from the second logic circuit with an input signal supplied externally. 
     The equivalent circuit is arranged to receive a plurality of input signals and to output equivalent signals having equivalent values corresponding to the plurality of input signals, respectively. 
     The first logic circuit includes a plurality of AND gates, each of the AND gates being adapted to receive two equivalent signals having different equivalent values for performing a logic product therebetween and to output a signal corresponding to a result of the logic product. 
     The first logic circuit is so arranged that at least one of the plurality of AND gates outputs the signal corresponding to the result of the logic product. 
     The second logic circuit is so arranged that the signals output from the plurality of AND gates are separated into a plurality of different groups, each of the plurality of groups being arranged to output a signal corresponding to the result of the logic sum. 
     The delay circuit includes a plurality of delaying elements, each of the delaying elements being arranged to receive a signal output from a corresponding group of the plurality of groups in the second logic circuit for delaying the received signal with a predetermined phase shift and to output the delayed signal as a carry signal. 
     The logic gate unit includes a plurality of logic gates, each of the logic gates being arranged to receive a signal output from a corresponding group of the plurality of groups in the second logic circuit for performing a logic sum of the received signal with the input received externally and to output a signal corresponding to a result of the logic sum as a binary signal. 
     The comparing unit is an adding circuit which is selectively adapted to employ one of a quadruple logic and a binary logic. 
     The adding circuit includes a logic converting circuit and is so arranged that a plurality of binary signals are converted into a plurality of quadruple signals through the logic converting circuit. 
     The adding circuit includes a binary logic input circuit and is so arranged that a plurality of binary signals are converted into a plurality of signals through the binary logic input circuit. 
     The square-root operating circuit is a parallel squaring circuit which is adapted to perform a parallel squaring operation. 
     The parallel squaring circuit further includes a plurality of first shift registers connected to the performing unit for holding a value corresponding to the input signal. 
     The parallel squaring circuit further includes a plurality of second shift registers for holding a result obtained in the comparing unit. 
     The comparing unit is so arranged that a search signal is supplied to each digit determined in parallel and the comparison in determined by a first digit of timing in the search signal. 
     The comparing unit comprises an equivalent circuit for inputting the input signal and for outputting an equivalent signal having an equivalent value which corresponds to the input signal, a first logic circuit connected to the equivalent circuit for performing a logical product of the equivalent signal output from the equivalent circuit with a logical product of the equivalent signal having a different equivalent value and for outputting a signal corresponding to a result of the logical product, and a second logic circuit connected to the first logic circuit for performing a logical sum of the signal output from the first logic circuit and for outputting a signal corresponding to a result of the logical sum. 
     The equivalent circuit is arranged such that the input signal includes two kinds of input signals, the two kinds of input signals including a first kind of input signal and a second kind of input signal. 
     The second logic circuit is so arranged that the signal corresponding to the result of the logic sum includes three kinds of output signals according to a comparison result between the two kinds of input signals, the three kinds of output signals including a first kind of output signal, a second kind of output signal, and a third kind of output signal. 
     The second logic circuit is so arranged that the first kind of output signal represents the first kind of input signal being larger than the second kind of input signal, the second kind of output signal represents the fist kind of input signal being equal to the second kind of input signal, and the third kind of output signal represents the first kind of input signal being less than the second kind of input signal, as the comparison result. 
     In operation, the originally given quadruple input signal or the quadruple input signal converted from a binary input signal through a predetermined converting circuit is sequentially compared with the square of the candidate square root given by a squaring circuit for deriving the square root from the top digit in sequence. When a digit having different values from each other is detected, it is determined if the input signal is larger or smaller than the square of the candidate square root. 
     Further objects and advantages of the present invention will be apparent from the following description of the preferred embodiment of the invention as illustrated in the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 is a flowchart showing an operation of a squaring type square-root operating circuit according to the present invention; 
     Fig. 2 is a view showing a program for executing the flowchart of FIG. 1; 
     FIG. 3 is a flowchart showing an operation of the multiplying type square-root operation circuit according to the m present invention; 
     FIG. 4 is a program for executing the flowchart of FIG. 3; 
     FIG. 5 is a circuit diagram showing a squaring circuit; 
     FIG. 6 is a circuit diagram showing a square-root operating circuit having a parallel square operating circuit according to the present invention; 
     FIG. 7 is a circuit diagram showing a register connected to the circuit of FIG. 6; 
     FIG. 8 is a circuit diagram showing a logic converting circuit used when a quadruple logic is used in the squaring circuit; 
     FIG. 9 is a circuit diagram showing a logic converting circuit used when a quadruple logic is used in the squaring circuit; 
     FIG. 10 is a circuit diagram showing a binary input circuit used when a binary logic is used in the squaring circuit; 
     FIG. 11 is a circuit diagram showing a binary input circuit used when a binary logic is used in the squaring circuit; 
     FIG. 12 is a circuit diagram showing an adding circuit used in the square-root operating circuit shown in FIG. 6; 
     FIG. 13 is a circuit diagram showing a logic converting circuit used when a quadruple logic is used in the adding circuit; 
     FIG. 14 is a circuit diagram showing a logic converting circuit used when a quadruple logic is used in the adding circuit; 
     FIG. 15 is a circuit diagram showing a binary input circuit used when a binary logic is used in the adding circuit; 
     FIG. 16 is a circuit diagram showing a binary input circuit used when a binary logic is used in the adding circuit; 
     FIG. 17 is a circuit diagram showing a comparator used in the square-foot operating circuit; 
     FIG. 18 is a circuit diagram showing a S&gt;W determining circuit of the comparator; 
     FIG. 19 is a circuit diagram showing a S=W determining circuit of the comparator; 
     FIG. 20 is a circuit diagram showing a S&lt;W determining circuit of the comparator; 
     FIG. 21 is a waveform showing a search signal to be fed to the S&gt;W determining circuit and the S&lt;W determining circuit; 
     FIG. 22 is a circuit diagram showing a logic converting circuit used when a quadruple logic is used in the comparator; 
     FIG. 23 is a circuit diagram showing a logic converting circuit used when a quadruple logic is used in the comparator; 
     FIG. 24 is a circuit diagram showing a binary input circuit used when a binary logic is used in the comparator; 
     FIG. 25 is a circuit diagram showing a binary input circuit used when a binary logic is used in the comparator; 
     FIG. 26 is a circuit diagram showing an 0→X 2i  and an 1→X 2i  circuits used in the square-root operating circuit; 
     FIG. 27 is a circuit diagram showing an 0→X 2i-1  and 1→X 2i-1  circuits used in the square-root operating circuit; 
     FIG. 28 is a circuit diagram showing an S register used in the square-root operating circuit; 
     FIG. 29 is a circuit diagram showing an address circuit for a square-root operating program shown in FIG. 2 or FIG. 4; 
     FIG. 30 is a flowchart showing an operation of a squaring type square-root operating circuit according to the present invention; 
     FIG. 31 is a view showing a program for executing the flowchart of FIG. 30; 
     FIG. 32 is a circuit diagram showing an address circuit for a square-root operating program shown in FIG. 31 or FIG. 34; 
     FIG. 33 is a flowchart showing an operation of the multiplying type square-root operating circuit according to the present invention; 
     FIG. 34 is a view showing a program for executing the flowchart of FIG. 33; 
     FIG. 35 is an explanatory graph showing the square-root operating time of this invention known by the inventors in contrast. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to the accompanying drawings, and embodiment of a square-root operating circuit according to the present invention will be described in details. 
     At first, an operating system employed in the square-root operating circuit according to the embodiment will be described as referring to the flowchart shown in FIG. 1. 
     In FIG. 1, a S denotes a value to be operated as a square root. The value S is stored in an 2n-bit S register. A candidate value X of a square root is stored in an X register. W denotes a square of the candidate value X. The square W is stored in a W register. Before starting the square-root operation, the value S and the square-root candidate value X are stored from the most significant digit in the corresponding registers. 
     An i in FIG. 1 denotes a number of each digit used in a flowchart or a program. It is conveniently used for explaining the system of a square root. The process of i-1→i can be automatically executed by means of a proper circuit such as a counter. 
     In FIGS. 1 and 2, the determinations of n→i, i-1→i, and i=1 are conveniently executed for explaining the operating system. It does not need any special operation. This determining is automatically and rapidly executed at the necessary steps (F2, F13, F14) and addresses (A 1 , A g ) through the effect of a proper circuit such as a counter. This holds true for FIG. 3. 
     In turn, the description will be oriented to floating-point operation. Assume that the floating point S has a mantissa S and an exponent part P. For a quadruple logic, the radix is 4. Hence, a square root x may be represented as follows. 
     
         x=(S4.sup.P).sup.1/2 =S.sup.1/2 2.sup.P 
    
     It is understood from this expression that it is not necessary to determine if the exponent part is an odd or an even. This is a feature of a quadruple root operation. It means that P is directly used as an exponent part of the square root x. 
     Assume that a value to be operated S is zero or a positive value. If it is negative, then it is determined that an error takes place at a step F1. At a step F2, a value of i is substituted for n. To obtain a square root of the mantissa S, at first, a value of &#34;3&#34; is placed at the most significant digit of the X register as a candidate value of a square root (step F3). 
     Then, X 2  is operated and is substituted for W (step F4). Next, S is compared with W (step F5). If S≧W is determined, it indicates that a value of &#34;3&#34; is the most significant digit. The operation goes to a step for obtaining a next digit of the square root (steps F13 and F14). 
     On the other hand, if S&lt;W is determined at the step F5, a value of &#34;2&#34; is stored as a candidate of a square root in the X register (step F6). At the next steps F7 and F8, it is determined whether or not the most significant digit of the square root is &#34;2&#34;. If the most significant digit of the square root is &#34;2&#34;, then like the above, the operation goes to the step F13 for obtaining the next digit. If the most significant digit of the square root is not &#34;2&#34;, then it is determined whether or not the most significant digit is &#34;1&#34; (steps F9 to F11). If the most significant digit of the square root is &#34;1&#34;, the operation goes to the step F13 for the same as described above. If the most significant digit of the square root is not &#34;1&#34;, then a zero is substituted for the most significant digit of the square root, and the operation goes to the step F13 for the same as described above. 
     To obtain each digit value of the square root to be stored at final stage, the above-described operation must be executed n times. An example of a program created for executing this square-root operating system will be illustrated in FIG. 2. 
     In FIG. 2, A 0  denotes an initial address. A 1 , A 2 , A 3 , . . . , A g  denote an execution address at which a square root is obtained. 
     This square-root operating system is arranged to obtain a square of a square-root candidate and compare the mantissa with the square at each digit for the purpose of obtaining a square root. This square-root operating system, therefore, provides far faster operation than known operation. 
     Though the circuit is made large in size, the square-root operating system may be expanded into a general operating system like a flowchart shown in FIG. 3 and a program shown in FIG. 4. 
     Referring to the FIGS. 3 and 4, the general operating system will be described in detail. 
     Assume that a value to be operated S is zero or a positive value. If it is negative, then it is determined that an error takes place at a step G1. At a step G2, a value of i is substituted for n. To obtain a square root of the mantissa S, at first, a value of &#34;3&#34; is placed at the most significant digits for the X and Y registers as a whole as well as a candidate value of a square root (step G3). Then an multiplication of XY is operated and is substituted for W (step G4). 
     Next, S is compared with W (step G5). If S≧W is determined, it indicates that a value of &#34;3&#34; is the most significant digit. The operation goes to a step for obtaining a next digit of the square root (steps G13 and G14). 
     On the other hand, if S&lt;W is determined at the step G5, a value of &#34;2&#34; is stored as a candidate of a square root in the X register (step G6). At the next steps G7 and G8, it is determined whether or not the most significant digit of the square root is &#34;2&#34;. If the most significant digit of the square root is &#34;2&#34;, then like the above, the operation goes to the step G13 for obtaining the next digit. If the most significant digit of the square root is not &#34;2&#34;, then it is determined whether or not the most significant digit is &#34;1&#34; (steps G9 and G11). If the most significant digit of the square root is &#34;1&#34;, the operation goes to the step G13 for the same as described above. If the most significant digit of the square root is not &#34;1&#34;, then a zero is substituted for the most significant digit of the square root, and the operation goes to the step G13 as described above. 
     To obtain each digit value of the square root to be stored at a final stage, the above-described operation must be executed n times. An example of a program created for executing this square-root operating system will be illustrated in FIG. 4. 
     In FIG. 4, A 0  denotes an initial address. A 1 , A 2 , A 3 , . . . , A g  denote an execution address at which a square root is obtained. 
     When executing the operating system as shown in FIGS. 3 and 4, a parallel multiplier disclosed in Japanese Patent Application No. 3-323205. This operating system is analogous to the operating system shown in FIGS. 1 and 2 as described above. 
     In this embodiment, as described above, the candidate value of each digit of the square root is searched from a larger value to a smaller one like &#34;3&#34;, &#34;2&#34;, &#34;1&#34; and &#34;0&#34;. However, it is also possible to search it from a smaller value to a larger one like &#34;0&#34;, &#34;1&#34;, &#34;2&#34; and &#34;3&#34; as well. This method is allowed to be implemented by analogous means described above. Hence, no special flowchart, program and circuit are disclosed herein. 
     The above-mentioned square-root operating circuit according to the present invention may apply to both a binary signal and a quadruple signal as will be discussed below. A composite signal of a binary logic and a quadruple logic may be used for this operating circuit. 
     The quadruple logic need half as many I/O signals as the binary logic. This feature is effective in the multiplier described in the Japanese Patent Application No. 3-323205 and a squaring circuit and a comparator as will be discussed below. When the square-root operating circuit is mounted on a large-scale integration circuit (LSI), this feature is more effective in reducing the internal wiring of the LSI. 
     Next, the description will be oriented to the squaring circuit (referred to as an X 2  circuit, hereinafter) used for executing the foregoing square-root operation. 
     The squaring (X 2 ) logic may be represented by the following charts. The square-root operating system shown herein is arranged to obtain a square root by using the X 2  circuit. The multiplying circuit disclosed in the Japanese Patent Application No. 3-323205 may be used for obtaining a square root. 
     
                       CHART 1                                                     
______________________________________                                    
           X.sub.0.sup.i                                                  
                 X.sub.1/3.sup.i                                          
                             X.sub.2/3.sup.i                              
                                   X.sub.1.sup.i                          
______________________________________                                    
C.sub.0.sup.i-1      1               1                                    
C.sub.1/3.sup.i-1                                                         
             1       2           1   2                                    
C.sub.2/3.sup.i-1                                                         
             2       3           2   3                                    
______________________________________                                    
 
    
     
                       CHART 2                                                     
______________________________________                                    
           X.sub.0.sup.i                                                  
                 X.sub.1/3.sup.i                                          
                             X.sub.2/3.sup.i                              
                                   X.sub.1.sup.i                          
______________________________________                                    
C.sub.0.sup.i-1                  1   2                                    
C.sub.1/3.sup.i-1                1   2                                    
C.sub.2/3.sup.i-1                1   2                                    
______________________________________                                    
 
    
     In the charts 1 and 2, X 0 , X 1/3 , X 2/3 , and  X1  stand for equivalent logic (X≡0), (X≡1/3), (X≡2/3) and (X≡1), respectively. For example, if X≡0, the equivalent logic (X≡0), that is, X 0  is &#34;1&#34;. The other equivalent logic are &#34;0&#34;. Likewise, C 0 , C 1/3  and C 2/3  stand for the equivalent logic (C≡0), (C≡1/3) and (C≡2/3), respectively. The blank in the chart stands for zero. 
     The chart 1 illustrates a logic expression &lt;Z&gt; for X 2 , that is, (Z 2 , Z 1 ). The chart 2 shows a logic expression &lt;C&gt; for a carrier output, that is, (C 2 , C 1 ). In these charts, a value of &#34;1&#34; is 01, a value of &#34;2&#34; is 10 and a value of &#34;3&#34; is 11. 
     It is understood from the above logic expression that the X 2  circuit is arranged as shown in FIG. 5. 
     The X 2  circuit shown in FIG. 5 is arranged to have an equivalent circuit 10, an AND circuit 11, an OR circuit 12, delay circuits 13 and 14, and OR gates 15 and 16. 
     To perform a parallel squaring operation, it is necessary to use the parallel squaring circuit having n of X 2  circuits 17 and n of the adding circuits 18 as shown in FIG. 6 and a shift register (W register) 19 for holding a value of X 2  as shown in FIG. 7. 
     The input circuit of the X register and the W register and the connecting circuit between the bits are, respectively, depending on the instructions to be executed according to the flowchart, such as (1→X 2i , 1→X 2i-1 ), (1→X 2i , 0→X 2i-1 ), (0→X 2i , 1→X 2i-1 ) and (0→X 2i , 0→X  2i-1 ). 
     If the quadruple logic is used in the X 2  circuit shown in FIG. 5, the binary signals X 2i , X 2i-1  and C 2i-2  and C 2i-3  are converted into the quadruple signals X i  &#39; and C i-1  &#34; according to the following chart 3. 
     
                       CHART 3                                                     
______________________________________                                    
X.sub.2i                                                                  
      X.sub.2i-1 C.sub.2i-2                                               
                         C.sub.2i-3                                       
                                  X.sub.i &#39;                               
                                      C.sub.i-1 &#34;                         
______________________________________                                    
0     0          0       0        0   0                                   
0     1          0       1        1/3 1/3                                 
1     0          1       0        2/3 2/3                                 
1     1          1       1        1   X                                   
______________________________________                                    
 
    
     The logic expression standing for the chart 3 may be represented by the following expression. ##EQU1## 
     The logic circuit corresponding to the expression 1 is shown in FIGS. 8 and 9, where a symbol   stands for a quadruple AND circuit and a symbol V stands for a quadruple OR circuit. 
     If the X 2  circuit shown in FIG. 5 uses a binary logic, the binary signals X 2i , X 2i-1  and C 2i-2 , C 2i-3  are converted into signals X 0   i , X 1/3   i , X 2/3   i , X 1   i  and C 0   i-1 , C 1/3   i-1 , C 2/3   i-1  through the effect of the binary logic input circuit shown in FIGS. 10 and 11. 
     Next, the description will be directed to an adding circuit arrangement included in the parallel squaring unit shown in FIG. 6. 
     The logic arranged in the adding circuit is the same as disclosed in the Japanese Patent Application No. 3-233219. The circuit arrangement of the adding circuit is the same as disclosed in the Japanese Patent Application No. 3-323205, which is shown in FIG. 12. 
     If the adding circuit employs quadruple logic, the binary signals Z 2i , Z 2i-1  and W 2i+2 , W 2i+1  are converted into the quadruple signals Z i  &#39; and W i  &#39; through the logic converting circuit shown in FIGS. 13 and 14. 
     If the adding circuit employs binary logic, the binary signals Z 2i , Z 2i-1  and W 2i+2 , W 2i+1  are converted into the signals Z 0   i , Z 1/3   i , Z 2/3   i , Z 1   i  and W 0   i , W 1/3   i , W 2/3   i , W 1   i  through the binary logic input circuit shown in FIGS. 15 and 16. 
     In turn the description will be oriented to a logic and a circuit arrangement of a comparator for performing a comparison about a square root. 
     The following chart 4 meets the relation of S i  &gt;W i , the following chart 5 meets the relation of S i  =W i , and the following chart 6 meets the relation of S i  &lt;W i . 
     
                       CHART 4                                                     
______________________________________                                    
          S.sub.0.sup.i                                                   
              S.sub.1/3.sup.i                                             
                           S.sub.2/3.sup.i                                
                                 S.sub.1.sup.i                            
______________________________________                                    
W.sub.0.sup.i     1            1   1                                      
W.sub.1/3.sup.i                1   1                                      
W.sub.2/3.sup.i                    1                                      
W.sub.1.sup.i                                                             
______________________________________                                    
 
    
     
                       CHART 5                                                     
______________________________________                                    
          S.sub.0.sup.i                                                   
              S.sub.1/3.sup.i                                             
                           S.sub.2/3.sup.i                                
                                 S.sub.1.sup.i                            
______________________________________                                    
W.sub.0.sup.i                                                             
            1                                                             
W.sub.1/3.sup.i   1                                                       
W.sub.2/3.sup.i                1                                          
W.sub.1.sup.i                      1                                      
______________________________________                                    
 
    
     
                       CHART 6                                                     
______________________________________                                    
          S.sub.0.sup.i                                                   
              S.sub.1/3.sup.i                                             
                           S.sub.2/3.sup.i                                
                                 S.sub.1.sup.i                            
______________________________________                                    
W.sub.0.sup.i                                                             
W.sub.1/3.sup.i                                                           
            1                                                             
W.sub.2/3.sup.i                                                           
            1     1                                                       
W.sub.1.sup.i                                                             
            1     1            1                                          
______________________________________                                    
 
    
     In each of these charts 4 to 6, S 0 , S 1/3 , S 2/3  and S 1  stand for equivalent logic (S≡0), (S≡1/3), (S≡2/3), and S≡1), respectively. Likewise, W 0 , W 1/3 , W 2/3  and W 1  stand for equivalent logic (W≡0), (W≡1/3), (W≡2/3) and (W≡1), respectively. 
     It is understood from these charts that the comparator may be arranged to have an equivalent value circuit 20, an AND circuit 21, and an OR circuit 22 as shown in FIG. 17. This comparator serves to compare S with W at each digit. To complete the comparison of S with W, however, it is necessary to compare the values of S and W at all the digits with each other. In this respect, the circuit for determining if S&gt;W is shown in FIG. 18. The circuit for determining if S=W is shown in FIG. 19. The circuit for determining if S&lt;W is shown in FIG. 20. Regarding timing shown in FIG. 21, search signal T 1  to T n  are supplied to the AND gate to which the compared result for each digit is applied from the circuits shown in FIGS. 18 and 20. 
     If this comparator employs a quadruple logic, the binary signals S 2i , S 2i-1  and W 2i , W 2i-1  are converted into the quadruple signals S i  &#39; and W i  &#39; through the logic converting circuits shown in FIGS. 22 and 23. In these figures, a symbol V stands for a quadruple OR circuit and a symbol   stands for a quadruple AND circuit. 
     If this comparator employs binary logic, the binary signals S 2i , S 2i-1  and W 2i , W 2i-1  are converted into the signals S 0   i , S 1/3   i , S 2/3   i , S 1   i  and W 0   i , W 1/3   i , W 2/3   i , W 1   i  through the binary input circuits shown in FIGS. 24 and 25. 
     In the square root operating system, the operating result of X 2  →W is determined at maximum n-bit time later and the compared result at each digit is applied to the OR circuit included in the S&gt;W determining circuit. This holds true for either the operating system employing a squaring circuit or a multiplier disclosed in Japanese Patent Application No. 3-323205. When it is applied, the search signal is supplied to the S&gt;W determining circuit in sequence from the highest digits. If it is detected that &#34;1&#34; has risen on a digit, S&gt;W is determined. The J 1  is set so as to establish &#34;1&#34;. This is true for the determination of S&lt;W. If S is equal to W at all the digits, (S n  =W n , S n-1  =W n-1 , . . . , S i  =W i , . . . , S 2  =W 2 , S 1  =W1), the relation of S=W is determined. Then, J 2  is set so as to establish &#34;1&#34;. 
     The determining method arranged as above makes it possible to far more rapidly execute the comparison than in known methods for detecting a borrow output given by a substraction and executing the comparison about the detected output. 
     Next, a circuit for executing the operation of 0→X 2i  or 1→X 2i  is shown in FIG. 26. A circuit for executing the operation of 0→X 2i-1  or 1→X 2i-1  is shown in FIG. 27. By feeding micro orders to these circuits according to chart 7, it is possible to set the values of X 2i  and X 2i-1  as &#34;0&#34; or &#34;1&#34;. 
     
                       CHART 7                                                     
______________________________________                                    
1      2      3        4    X.sub.2i                                      
                                   X.sub.2i-1                             
______________________________________                                    
0      0      0        0    0      0     (&#34;0&#34;)                            
0      1      0        1    Hold                                          
0      0      1        0    0      1     (&#34;1&#34;)                            
1      0      0        0    1      0     (&#34;2&#34;)                            
1      0      1        0    1      1     (&#34;3&#34;)                            
______________________________________                                    
 1 = A.sub.2 + A.sub.4 J.sub.3                                            
 3 = A.sub.2 + A.sub.6 J.sub.3                                            
 
    
     FIG. 28 shows one arrangement of an S register. FIG. 29 shows one arrangement of an address circuit for executing the programs shown in FIGS. 2 and 4. In FIGS. 28 and 29, J 4  denotes a circuit to be set when i=1 and to be implemented by the normal means. Hence, the circuit J 4  is not illustrated herein. 
     In turn, the description will be directed to another operating system to be performed by the square-root operating circuit of the present invention as referring to FIGS. 30 and 31. 
     This operating system is a transformation of the operating system as shown in FIGS. 1 and 2. The operating system shown in FIGS. 1 and 2 is arranged to obtain an n-digit square root, while the operating system in FIGS. 30 and 31 is arranged to terminate a square-root operation when S=W is established. 
     As shown in FIG. 30, each of the steps F5, F8 and F11 of the flowchart shown in FIG. 1 is divided into the determinations of S&gt;W and S=W. That is, those steps are transformed into the steps F51, F52, F81, F82, F111 and F112, respectively. If S=W is given, the square-root operation is terminated. 
     As shown in the program of FIG. 31, when S=W is given at the execution address A 4 , J 2  is set. At the execution addresses A 6  and A 8 , if S=W is given, J 2  is set. When the initial address A O  is respectively transferred into the next address, the square-root operation is terminated. 
     FIG. 32 shows an arrangement of an address circuit where this operating system is executed. 
     Next, the description will be directed to another operating system to be done by the square-root operating circuit of the present invention as referring to FIGS. 33 and 34. 
     This operating system is also a transformation of the operating system shown in FIGS. 3 and 4. The operating system shown in FIGS. 3 and 4 is arranged to obtain an n-digit square root by using a parallel multiplier, while this transformational operating system is arranged to terminate a square-root operation if S=W is given. 
     That is, as shown in FIG. 33, the steps G5, G8 and G11 of the flowchart shown in FIG. 3 are divided into the determination of S&gt;W and S=W. Concretely, those steps G5, G8 and G11 are transformed into the new steps G51, G52, G81, G82 G111, and G112. If S=W is established, the square-root operation is terminated. 
     As shown in the program of FIG. 34, when S=W is established at the execution address A 4 , J 2  is set. At the execution addresses A 6  and A 8 , is S=W is established, J 2  is set. The initial address A O  is respectively transformed into the next address. Then, the square-root operation is terminated. 
     The present operating system may employ the address circuit shown in FIG. 32. 
     The operating time consumed in the square-root operating circuit of the invention will be discussed later. 
     To operate a square root of the value consisting of n bits, n-bit time is needed for one squaring or multiplication. To obtain a square root per one digit, a maximum of three squares or multiplications are necessary. Since in actuality the squaring or multiplication is done when 0→X 2i  and 0→X 2i-1  (or 0→X 2i , Y 2i , 0→X 2i-1 , Y 2i-1 ) are done, four times are considered to ne approximately maximum. In this case, the squaring or multiplying time needs 4n-bit time. By repeating in n/2 time corresponding to n/2 digit, a maximum of 2n 2  is needed for obtaining a square root. 
     When the operating system of this invention needs a square-root operation for all binary bits, the necessary operations are approximately as many as two operations, that is, 2n×2×n. In total, 4n 2  -bit time is needed. It means that the approximate maximum bit time can be reduced in half. In other words, the operating speed is doubled. This means that the reduction of a physical clock frequency in a half does not change the operating speed. 
     Expansively considered, the time of operating a square root changes as shown by a graph of FIG. 35. The graph indicates that the use of a quadruple logic makes is possible to obtain the highest square-root operating speed. 
     The square-root operating system disclosed herein may be the same serial operating system as described in the Japanese Patent Application No. 3-323205. 
     Many widely different embodiment of the present invention may be constructed without departing from the spirit and scope of the present invention. It should be understood that the present invention is not limited to the specific embodiments described in the specification, except as defined in the appended claims.