Abstract:
A circuit for squaring a binary number X of n bits, x 0  to x n-1 , includes pre-processing circuits to form a group of all the products x i  y j  of the bits of number X, where i and j vary between 0 and n-1 such that i≦j. The outputs of the pre-processing circuits provide words such that each word is formed by a succession, as complete as possible, of products selected among the products remaining from the group of products after forming the preceding word, each product x i  y j  of this succession being affected with a weight i+j+1 of the word if i is different from j, or with a weight 2i if i=j. Adders are connected to sum the words as the square of the number X.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to a squaring circuit for squaring an n-bit binary number X hereinafter referenced [x n-1 , x n-2 , . . . x 0  ]. 
     2. Discussion of the Related Art 
     To square a binary number X, a table of squared numbers stored in a non-volatile memory (ROM) is commonly used, the number X being applied on the address lines of the ROM. To store all the squares of an n-bit number X, the size of the ROM must be of 2 n  words of 2n bits. Such a ROM-table is particularly large in silicon area. 
     Furthermore, a ROM has a long access time. In present common technologies, successive words in ROM cannot be accessed at a frequency as high as approximately 50 MHz. 
     Another method for squaring a number X is to use a binary multiplier provided twice with the number X. The operation of a conventional specific binary multiplier, referred to as a Booth&#39;s multiplier, as described below, is advantageous in that it is fast and uses a relatively small area. 
     By multiplying a binary number X expressed in decimal by x 0  2 0  +x 1  2 1  + . . . x i  2 i  + . . . x n-1  2 n-1  and a binary number Y expressed in decimal by y 0  2 0  +y 1  2 1  + . . . y i  2 i  + . . . y n-1  2 n-1 , a product XY is obtained equal in decimal to the sum of all the products x i  y j  2 i+j , where x i  =0 or 1, y j  =0 or 1, and i and j vary between 0 and n-1. 
     The products x i  y j  (equal to 0 or 1) are arranged in a table having 2n-1 columns numbered from 0 to 2n-2, from right to left, corresponding to successive weights of the binary product XY, and n lines numbered from L1 to Ln. 
     FIG. 1 represents such a table with exemplary four-bit numbers X and Y. In a column of weight k, all the products x i  y j  such that i+j=k are successively arranged. The table is filled triangularly, as represented. The value (0 or 1) of each product x i  y j  is obtained by pre-processing circuits that define a logic AND between the bit x i  of number X and the bit y j  of number Y. Each line Lp (p=1, 2, . . . n) corresponds to a word Lp whose bits of successive weights are constituted by the contents of the cells of line Lp, respectively. The desired binary product XY is obtained by summing the words L1 to Ln. 
     Hereinafter, terms such as &#34;line&#34; of the table and &#34;word&#34; are used interchangeably as are &#34;cell&#34;, &#34;term&#34;, and &#34;bit&#34; of the table. 
     To sum words L1 to Ln, it is common to use a first series of adders to sum the words by pairs, a second series of adders to sum the outputs of the first series of adders by pairs, and so on. In the example of FIG. 1, a first adder would sum words L1 and L2, a second adder would sum words L3 and L4, and a third adder would sum the results provided by the first and second adders. Generally, n-1 adders are required to sum the n words L. 
     When a Booth&#39;s multiplier is used to square a number X, a table such as the one of FIG. 1 is obtained by replacing y&#39;s with x&#39;s. 
     FIG. 2A represents an elementary summing cell of a conventional adder. Two bits of weight i, Ai, and Bi, of two words to sum are provided to an Exclusive OR gate 10 whose output provides the sum Si of bits Ai and Bi. Moreover, the gate 10 receives a carry bit Ci-1 generated by a preceding cell summing the bits of weight i-1 of the two words to sum. The cell provides a carry bit Ci to the next cell through an OR gate 12 receiving the outputs of three AND gates 14. A first of gates 14 receives bits Ai and Bi, a second gate receives bits Ai and Ci-1, and a third gate receives bits Bi and Ci-1. 
     A p-bit adder includes p-1 cells, referred to as full-adders, such as the ones of FIG. 2A, and includes, for weight 0, a simpler, so-called half-adder, described hereinafter. 
     Gates 12 and 14 have a specific switching time. Thus, a carry bit Ci is steady shortly after the inputs Ai, Bi and Ci-1 are steady. The same is true for the carry bit Ci-1 which has a steady value shortly after the inputs of the preceding cell are steady, and so on. It is said that the carry bit propagates from the cell of weight 0 to the cell of highest weight. The stabilization time of the output of a p-bit adder is substantially equal to the propagation time, that is, proportional to p. 
     If, additionally, the output of a first adder is provided to a second adder, the output of the second adder can stabilize only when the output of the first adder is steady. The stabilization time of the last adder of a set of cascaded adders increases with the number of adders. 
     Accordingly, to increase the speed of a circuit such as a Booth&#39;s multiplier, using cascaded adders, it is advantageous to decrease the size of the adders and the number of the cascaded adders. 
     The table of FIG. 1 has some properties allowing to simplify the adders to be used and to decrease their stabilization time. Indeed, a large number of cells of the table are empty (at 0). To sum the words L3 and L4, for example, a 5-bit adder is normally needed. However, the bits of weight 0 and 1 of word L3 are zero and the bits of weights 0 to 2 and 4 of word L4 are zero. In an adder summing the words L3 and L4, the outputs S0 and S1 are forced to 0 and the output S2 is directly connected to the bit of weight 2 (x 2  y 0 ) of word L3. To sum the bits of weight 3, a half-adder is used, and to sum the bits of weight 4, since one of the bits is zero, a cell similar to the half-adder is used. Thus, instead of using a 5-bit adder, an adder with only two half-adders is used. 
     FIG. 2B represents a half-adder. When one of the bits of the numbers to be summed is zero, or when the cell is the first one (receiving no carry bit), the cell structure is simplified. When one of the bits, for example Bi, is zero the cell includes an Exclusive OR gate 16 receiving the non-zero bit Ai and carry bit Ci-1 provided by the preceding cell. An AND gate 18 receiving the bits Ai and Ci-1 provides the carry bit Ci to the next cell. The first cell of an adder has the same structure except that i=0, and bit B0 is provided to gate 16 instead of carry bit Ci-1. The structure of FIG. 2B is simpler and faster than the one of FIG. 2A. It is therefore advisable to use this structure whenever possible. 
     SUMMARY OF THE INVENTION 
     An object of the present invention is to provide a particularly fast squaring circuit based on the Booth&#39;s method. 
     A further object of the present invention is to provide such a squaring circuit occupying a particularly small area. 
     To achieve these objects, the present invention provides a squaring circuit for squaring an n-bit binary number X, x 0  to x n-1 . The squaring circuit includes pre-processing circuits to form the set of products x i  y j  of the bits of number X, where i and j vary between 0 and n-1 such that i≦j. The outputs of the pre-processing circuits provide words such that each word is formed by a succession, as full as possible, of products selected among the products remaining from the set of products after the formation of the preceding word. Each product x i  y j  of this succession is classified at a weight i+j+1 of the word if i is different from j, or at a weight 2i if i=j. Adders are connected to sum the words as the square of the number X. 
     According to an embodiment of the invention, the pre-processing circuits include means for forming the sum of the products normally corresponding to two bits of two words having the same weight. This sum is provided to one of the two bits, and the other bit is forced to zero, the carry bit of the sum is propagated to a normally zero bit of one of the words. 
     According to an embodiment of the present invention, the pre-processing circuits directly form from the bits of the number X the values of the bits to be modified by the sum and the propagation of the carry bit. 
     According to an embodiment of the present invention, the adders include carry-save cascaded adders. 
     According to an embodiment of the present invention, the circuit squares a signed number X&#39; of n+1 bits x 0  -x n . For this purpose, the pre-processing circuits add to the set, to form the words, the following terms: 1 classified at weight n+1 of a word, x n  classified at weight 2n of a word, and the complements of products x i  x n , where i varies from 0 to n-1, respectively classified at weights i+n+1 of a word. 
     The foregoing and other objects, features, aspects and advantages of the invention will become apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings. 
    
    
     BRIEF DESCRIPTION OF DRAWINGS 
     FIG. 1, above described, illustrates a conventional method for multiplying two binary numbers; 
     FIGS. 2A and 2B, above described, represent elementary cells of an adder; 
     FIG. 3A-3D illustrate exemplary optimization steps of a squaring circuit of positive numbers according to the invention; 
     FIGS. 4A and 4B represent two embodiments of the squaring circuit according to the invention, that are realized from the tables of FIG. 3B and 3D, respectively; 
     FIGS. 5A-5C illustrate exemplary optimization steps of a squaring circuit of signed numbers according to the invention; 
     FIG. 6 represents an embodiment of a squaring circuit realized from the table of FIG. 5C; 
     FIGS. 7A and 7B illustrate, in another example, an initial step and a final step of an optimization of a squaring circuit of positive numbers according to the invention; 
     FIG. 8 represents an advantageous embodiment of the squaring circuit realized from the table of FIG. 7B; 
     FIGS. 9A and 9B illustrate, in another example, an initial step and a final step of an optimization of a squaring circuit of signed numbers according to the invention; and 
     FIG. 10 represents an advantageous embodiment of the squaring circuit realized from the table of FIG. 9B. 
    
    
     DETAILED DESCRIPTION 
     FIG. 3A corresponds to the table of FIG. 1 when squaring a number X, all the pairs of equal products being grouped. In each column, each pair of products x i  x j , x j  x i  is replaced by product 2x i  x j . The products x i  x i  (0 by 0 or 1 by 1) are equal to x i , as apparent in the tables. The multiplication by 2 of a product x i  x j  amounts to shifting this product of one column to the left. 
     FIG. 3B represents the result of these left-shifts. A table of n/2+1 lines (3 in the present example) if n is even, and (n+1)/2 lines if n is odd is obtained. Each product x i  x j , such that i&lt;j (or j&lt;i), is arranged in the column of weight i+j+1 and each term x k  (corresponding to a product x k  x k ) is arranged in the column of weight 2k. 
     The sum of words L corresponding to the lines of the table constitutes the desired squared number X 2 . 
     An initial step of the invention is to reorder the words to be summed so as to obtain n/2+1 words, if n is even, or (n+1)/2 words if n is odd, instead of n words that are obtained by directly applying Booth&#39;s method. In addition, it should be appreciated that the words to add have a large number of bits at 0 (corresponding to empty or zero cells). Thus, apart from the fact that the number of adders is reduced, adders including fewer full-adders can be used. Accordingly, each adder is faster and smaller. 
     An aspect of the invention is to cancel additional cells of the table, especially the outermost cells of the lines and even full lines. 
     FIG. 3C illustrates an optimization step of the table of FIG. 3B according to this aspect of the invention. In the above table 3B, a dotted frame represents the elements that are modified to carry out this optimization. To obtain the table of FIG. 3C, the term x 1  x 2  of line L2, column 4, is replaced with the sum of this term and the term x 2  of line L3, column 4, which provides the term x 1  *x 2  at line L2, column 4. The symbol * indicates that the number which precedes it is complemented. Of course, the sum of terms x 1  x 2  and x 2  provides a carry bit x 1  x 2 . The carry bit is inserted into an empty cell at line L2, column 5. 
     According to another aspect of the invention, a sum (for example x 1  *x 2  in column 4) and a carry bit (for example x 1  x 2  in column 5) are not obtained by an adder which sums the values of the corresponding cells (x 1  x 2  and x 2 ), but directly from bits (x 1  and x 2 ) of number X by logic gates. This reduces the number of logic gates connected in series and therefore increases the response speed of the circuit. 
     The step of FIG. 3C allows to eliminate a line of the table. To obtain the square X 2 , the two words corresponding to the two lines of the table are merely summed. The use of an adder is spared regarding a circuit realized from the table of FIG. 3B. 
     FIG. 3D represents an optimization step of the table of FIG. 3C. The modified elements in the table of FIG. 3C are surrounded by a dotted frame. The term x 0  x 1  at line L1, column 2, is replaced with the sum of itself and the term x 1  at line L2, column 2. Term x 0  *x 1  is obtained at line L1, column 2, and the carry bit, x 0  x 1 , is inserted at line L2, column 3 where it fills an empty cell. As above, the sum and the carry bits are directly obtained from the bits x 0  and x 1  of number X. 
     This optimization lets an additional empty cell appear at the right of line L2 (of word L2). Thus, to sum words L1 and L2, a 4-bit adder is needed instead of a 5-bit adder in the case of FIG. 3C. The bits of weights 3 to 6 of words L1 and L2 are provided to the adder and the bits of weights 0 to 2 of word L1 directly constitute the bits of weights 0 to 2 of number X 2 . Accordingly, this optimization allows to decrease the size and, thereby, the response time of the circuit. 
     FIG. 4A represents a squaring circuit realized from the table of FIG. 3B. This circuit includes pre-processing circuits 30 receiving the bits of number X to be squared. These pre-processing circuits provide all the non-zero terms (x i  x j , x k ) of the table of FIG. 3B; they are directly obtained by AND gates from bits x of number X. A 5-bit adder 32 sums the bits of weights 2 to 6 of words L1 and L2. The bits of weights 0 and 1 of word L1 are directly provided as bits of weights 0 and 1 of the squared number X 2 . A 4-bit adder 34 sums the word L3 of the four most significant output bits of adder 32, the two outputs of least significance being directly provided as bits of weights 2 and 3 of the square number X 2 . Since all the bits, except one bit of word L3, are zero, the adder 34 includes only half-adders. 
     FIG. 4B represents an embodiment of a squaring circuit according to the invention provided by the optimization step of FIG. 3D. The squaring circuit also includes pre-processing circuits 30 receiving the bits of number X and providing all the non-zero terms of the table of FIG. 3D. These terms are directly obtained from bits x of the number X through suitable combinations of logic gates that those skilled in the art will be able to find from the table (for example, the term x 0  *x 1  is obtained by an AND gate receiving the bit x 1  and the complement of bit x 0 ). The bits of weights 0 to 2 of word L1 are provided as bits of weights 0 to 2 of number X 2 , and the bits of weights 3 to 6 of words L1 and L2 are added by adder 36 to provide the five remaining bits of weights 3 to 7 of number X 2 . With this embodiment, one fewer adder is required compared with the embodiment of FIG. 4A. 
     In the above description, it is assumed that number X is positive. However the present invention also applies to signed binary numbers X&#39; of n+1 bits [x n , x n-  1, . . . x 0  ], whose bit x n  is a sign bit. A signed number X&#39; is expressed in decimal by the sum of products x i  2 i  (i ranging from 0 to n-1) and of term -x n  2 n . When this number is squared, the sum of the following terms expressed in decimal are obtained: 
     X 2 , the square expressed in decimal of the positive binary number X=[x n-1 , x n-2 , . . . x 0  ]; 
     the sum of terms -x i  x n  2 i+n+1  where i ranges from 0 to n-1; and 
     the term x n  2 2n . 
     If the conventional rule of the &#34;2&#39;s complement&#34; is applied to express signed binary numbers, where the complement of a binary number is equal to its complement plus 1, the squared number X&#39; 2  is expressed, in decimal, by the sum of the terms X 2 , x n  2 2n , 2 n+1  and of the products (x i  x n )*2 i+n+1  where i ranges from 0 to n-1. 
     FIG. 5A represents a table grouping these terms, in an example where the signed number X&#39; has 5 bits (4 bits are plus a sign bit). The terms of number X 2  are arranged in the same manner as in the table of FIG. 3B in columns 0 to 6. Moreover, in two additional lines (L4 and L5), the terms (x i  x n )*, where i varies between 0 and n-1, are arranged in the respective columns i+n+1. The term 1 is in the column n+1 (5), and the term x n  (x 4 ) is in the column 2n (8). As above, the desired square X&#39; 2  is obtained by summing the lines of the table. The arrangement of FIG. 5A is not optimal but is more advantageous than an arrangement directly obtained from Booth&#39;s method. 
     FIG. 5B represents an optimization step of the table of FIG. 5A. The terms corresponding to the number X 2  are optimized according to the above description with reference to FIG. 3D. The term x 4  of column 8 is inserted into the first line of column 8. So, n/2+2 lines are added (if n is even) whereas, with Booth&#39;s method, at least n+1 lines would be added. 
     FIG. 5C is a table illustrating an additional optimization step according to the invention. In the table of FIG. 5B, the terms affected by this optimization are surrounded with a dotted frame. The term x 1  x 2  of line L2, column 5, is replaced with the sum of the terms of column 5, lines L2 to L4 (x 1  x 2 , (x 0  x 4 )*, 1). This sum is referenced S1 in the table of FIG. 5C and is expressed by: 
     
         S1=x.sub.0 x.sub.4 XOR x.sub.1 x.sub.2, 
    
     where XOR designates the logic Exclusive OR operator. The carry bit of this sum is inserted into column 6. This carry bit is added to the terms (x 2  x 3 , x 3 ) of lines L1 and L2, column 6 to form a sum S2 replacing the term x 2  x 3  of line L1, column 6. The sum S2 is expressed by: 
     
         S2=x.sub.2 *x.sub.3 XOR x.sub.1 x.sub.2 OR (x.sub.0 x.sub.4)*. 
    
     The carry bit C2 of sum S2 is inserted in the empty cell of line L1, column 7. The carry bit C2 is expressed by: 
     
         C2=x.sub.3 (x.sub.2 OR (x.sub.0 x.sub.4)*). 
    
     The carry bit of the sum of the terms of column 5 has been propagated to an empty cell of a column (7) of higher weight. 
     Thus, the cells of weights 6 to 8 of line L2 are freed and respectively receive the remaining terms (x 1  x 4 )*, (x 2  x 4 )*, and (x 3  x 4 )* of line L3. Thereby, the table is reduced by two lines. 
     FIG. 6 represents an embodiment of a squaring circuit according to the invention provided by the optimization of FIG. 5C. This circuit differs from the one of FIG. 4B in that the pre-processing circuits 30 provide the values of the table of FIG. 5C and in that the adder 36 is a 5-bit adder summing the terms of columns 3 to 7 of FIG. 5C. The terms of column 8 are ignored because they correspond to the sign bit, which is always zero since a square number is positive. Additionally, the 5-bit adder 36 should normally provide the sum on 5 bits plus one carry bit. In FIG. 6, the carry bit of adder 36, which would constitute a ninth bit of the square number X&#39; 2 , is ignored. 
     A binary number X&#39; having n bits and a sign bit can have decimal values between -2 n  and 2 n  -1. In many cases, for example if number X&#39; corresponds to the difference between two positive binary numbers of n bits, number X&#39; has decimal values only between -(2 n  -1) and 2 n  -1; in this case, the square of X&#39; is expressed with 2n bits. In contrast, if number X&#39; can have the value -2 n , the square of this number is expressed with 2n+1 bits; the column of weight 2n is then taken into account. 
     FIGS. 7A and 7B are tables corresponding to the optimization steps of FIGS. 3A and 3D with an exemplary positive number of n=8 bits. 
     In FIG. 7A, the terms are distributed in accordance with the general rule described with reference to FIG. 3B. The table includes 5 lines, instead of 8 which would be obtained by applying Booth&#39;s method. 
     In FIG. 7B, the number of lines is reduced to 4 according to the method described with reference to FIG. 3C. Also, the rightmost terms are cancelled up to column 4 of lines 2 and 3, in the way described with reference to FIG. 3D. The term x 0  x 1  of line L1, column 2, is replaced with the sum of itself and the term x 1  of line L2, column 2. The term x 0  x 2  of line L1, column 3, is replaced with the sum of itself and the carry bit of the sum carried out in column 2. In column 3, the surrounded + corresponds to the Exclusive OR operation. The term x 0  x 3  of line L1, column 4, is replaced with the sum of the terms of lines L1 to L3 of column 4 and the carry bit of the sum carried out in column 3. This sum SO is expressed by: 
     
         SO=x.sub.0 x.sub.3 XOR x.sub.2 (x.sub.0 OR x.sub.1 *). 
    
     Since the sum SO corresponds to the sum of four terms, a double carry bit is generated. One carry bit, x 1  x 2 , is inserted at line L3, column 5, and the other carry bit, x 0  x 2  x 3 , is inserted at line L4, column 5, in two respective empty cells. 
     Of course, as indicated above, the sums inserted into cells of the table are not obtained by adders, but directly by logic circuits, from bits of number X. Thus, for example, the term x 0  x 2  x 3  of line L4, column 5, is obtained by a three-input AND gate receiving the bits x 0 , x 2 , and x 3 , respectively. 
     In the table of FIG. 7B, the term of line L4, column 10 is also cancelled by adding it to the term of the preceding line and inserting the carry bit in column 11. Also, the term of line L3, column 12, is cancelled by adding it to the term of the preceding line and inserting the carry bit in the empty cell of line L2, column 13. 
     By cancelling cells at both ends of the lines, the structure of the adders that will add these lines is simplified. Especially, by cancelling cells at the rightmost end of the lines, the number of bits of the adders decreases. A particularly advantageous optimization is obtained by cancelling as many terms as possible at the right and left ends of the lines of the table. Those skilled in the art will be able to cancel these terms in many ways. The cancelling of terms illustrated in the table are shown by way of example only. Indeed, the terms of each column can be shuffled and each shuffle provides a distinct sum of terms to cancel a cell of the table. 
     FIG. 8 represents a particularly advantageous embodiment of a squaring circuit according to the invention obtained by the optimization of the table of FIG. 7B. The terms of weights 0 to 4 of the first line of the table of FIG. 7B are directly provided as the bits of weights 0 to 4 of the square number to provide. 
     According to a particularly advantageous embodiment of the invention, carry-save adders are used to carry out the sums. A carry-save adder is an adder including three inputs and two outputs. The three inputs receive three binary numbers to be added. An elementary cell of such an adder is identical to the cell of a conventional adder, as represented in FIG. 2A, except that the input Ci-1 of the cell receives the bit of weight i of the third number to be added and that the output Ci of the OR gate 12 is not connected to the next cell. The outputs Si of the Exclusive OR gate 10 constitute a first output S of the carry-save adder, and the outputs Ci of the OR gates 12 constitute the second output C of the carry-save adder. Furthermore, the weights of the outputs C are increased by 1. The advantage of such an adder is that there is no stabilization delay caused by the propagation of the carry bits. The response time of the adder is approximately equal to the switching time of the Exclusive OR gate 10. 
     One of the carry-save adders, 80, receives the bits of weights 5 to 14 of words L1 to L3. Since the three bits of weights 12 to 14 of word L3 are zero, the corresponding elementary cells of adder 80, which merely have to sum two bits each, have a simple structure such as the one of FIG. 2B. 
     A second carry-save adder 82 receives the two outputs of adder 80 and the bits of weights 5 to 9 of word L4. Since the bits of weights 10 to 14 of word L4 are zero, the corresponding cells of adder 82 have a simple configuration, such as the one of FIG. 2B. 
     Finally, a normal adder 84 (without a carry-save function) adds the outputs of adder 82 and provides the bits of weights 5 to 15 of the square number X 2 . 
     The adder 80 is a 10-bit adder. Its output S is provided on 10 bits, and its output C is provided on 11 bits. Accordingly, the adder 82 is an 11-bit adder and normally provides an output S on 11 bits and an output C on 13 bits. Only 11 bits out of these 13 bits are used, the remaining bits being at 0. In practice, in the example of FIG. 7B, the last three bits of the output C of adder 82 are always zero. This allows to simplify the adders 82 and 84 by using, for the zero bits, half-adders in adder 84, and to eliminate the gates 12 and 14 of the corresponding cells of the adder 82. 
     FIG. 9A represents a table, corresponding to the table of FIG. 5B, for a number X&#39; having n=8 bits x 0  to x 7  and a sign bit x 8 . This table is filled in accordance with the general rules, mentioned above with reference to FIGS. 5A and 5B. 
     FIG. 9B represents an optimization of the table of FIG. 9A in accordance with the description relating to FIG. 5C. By summations that will not be described in detail, terms have been cancelled in the lines in order to raise the lines 5 and 6 of FIG. 9A. The new values of the terms, provided by the sums of terms of same columns and propagating the carry bits, are written in the cells. The sum S1 in line L4, column 9, is expressed by x 3  x 4  XOR x 0  x 8 . The carry bit C1 of this sum, in line L3, column 10, is expressed by x 3  x 4  OR (x 0  x 8 )*. The sum S2 in line L2, column 10, is expressed by x 4  *x 5  XOR x 6  x 3  and the carry bit C2 of this sum, in line L3, column 11, is expressed by x 4  *x 5  x 6  x 3 . 
     FIG. 10 represents an embodiment of a squaring circuit according to the invention obtained by the optimization of FIG. 9B. This circuit is similar to the circuit of FIG. 8 except for the fact that the adder 80 is provided with an additional bit, of weight 12, of word L3, and that the adder 82 is provided with six additional bits, of weights 10 to 15, of word L4. Of course, the pre-processing circuits 30 of the squaring circuit are different from those of FIG. 8 since the logic functions they must provide, indicated in the table of FIG. 9B, are distinct functions. 
     The present invention has been described by using specific examples for simplifying the tables. Of course, many other possibilities will appear to those skilled in the art, by suitably shuffling the terms of the columns and by cancelling specific terms. 
     Having thus described one particular embodiment of the invention, various alterations, modifications, and improvements will readily occur to those skilled in the art. Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and scope of the invention. Accordingly, the foregoing description is by way of example only and is not intended to be limiting. The invention is limited only as defined in the following claims and the equivalents thereto.