Abstract:
A relatively small set of cells is shown for constructing a conditional carry adder for two N-digit operands. The structure and organization of the cells is adaptable for constructing any length adder with both high absolute performance and low circuit complexity in LSI by either bipolar or MOS techniques. In addition, the technique is shown adapted for use as either an incrementor or as a priority encoder.

Description:
CROSS REFERENCE TO RELATED APPLICATION 
     This application is a continuation of application Ser. No. 410,807, filed 8/23/82, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The addition of two N-bit operands to form an N-bit result, often called &#34;carry propagate addition&#34;, is a fundamental operation in digital processors. A variety of techniques have been developed to perform this operation. 
     A simple method for performing carry propagate addition is the ripple adder. The ripple adder requires relatively few transistors per bit, but it is usually a relatively slow technique. The ripple adder is thus the technique against which other methods are often measured. 
     FIG. 1 shows a typical ripple adder cell. A(i) and B(i) are individual bits of the two operands to be added, Cin(i) is the carry-in signal from the prior adder cell, Cout(i) is the carry-out signal from the present cell, and Sum(i) is the sum signal of the present cell. The carry-out signal of one cell is the carry-in signal to the next cell. Table 1, shown as a PASCAL-like language program, summarizes the Boolean equations for the ripple adder method, where &#34;+&#34; is the Boolean &#34;OR&#34;, &#34;*&#34; is the Boolean &#34;AND&#34;, and &#34;XOR&#34; is the Boolean &#34;Exclusive-OR&#34;: 
     
                       TABLE 1______________________________________For     i = 0 through N-1 (N bit adder) DO BEGIN   K(i) = A(i) + B(i)   G(i) = A(i) * B(i)   P(i) = A(i) XOR B(i)   Cout(i) = G(i) + [K(i) * Cin(i)] = Cin(i+1)   Sum(i) = P(i) XOR Cin(i)End______________________________________ 
    
     The ripple adder may be sped up with the addition of &#34;carry look ahead&#34; circuitry. To implement a carry look ahead adder, the ripple adder cells are organized into blocks of, for example, four ripple adder cells. Each block of four ripple adder cells as shown in FIG. 2 is provided with additional gates which allow carry propagation across the entire block if the &#34;K&#34; bits are all 1 (i.e., the outputs of the OR gates K(i)). The carry look ahead adder is moderately fast and is economical to implement in MOS circuitry. 
     Another scheme is the &#34;conditional sum&#34; adder reported by Sklansky, &#34;Conditional-Sum Addition Logic&#34;, I.R.E. Transactions on Electronic Computers, page 226, June 1960. Although very fast in operation, conditional sum addition takes far more logic to implement than the other, slower techniques discussed above. The result is that conditinal sum addition has a very high cost per bit. In practice, this technique has not enjoyed widespread usage. 
     Thus, several methods for performing N-bit addition have been used in the prior art. However, these known methods are often either too slow for the new generations of computers or they are substantially more complex and costly than is desirable. 
    
    
     DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a ripple adder cell for performing carry propagate addition according to the prior art. 
     FIG. 2 shows the organization of cell blocks to perform the carry look ahead function according to the prior art. 
     FIGS. 3A and 3B show the first embodiment of the present invention, the conditional carry adder &#34;A&#34;. 
     FIG. 4 shows the organization of a complete 8-bit conditional carry adder &#34;B&#34;. 
     FIG. 5 shows an 8-bit incrementor using the conditional carry adder &#34;B&#34; technique. 
     FIG. 6 shows the cells used for producing an incrementor using the conditional carry adder &#34;A&#34; technique. 
     FIG. 6A shows a complete 9-bit incrementor using the cells of FIG. 6. 
     FIG. 7 shows a complete 8-bit to 3-bit priority encoder using the conditional carry adder &#34;B&#34; technique. 
     FIG. 8 shows the cells used for producing a priority encoder using the conditional carry adder &#34;A&#34; technique. 
     FIG. 8A shows a complete 9-bit to 4-bit priority encoder using the cells of FIG. 8. 
    
    
     SUMMARY OF THE INVENTION 
     Two embodiments of a new and novel circuit are disclosed for the conditional carry addition of two N-digit operands. The adder is organized as a series of cells which generate intermediate carry signals. These intermediate carry signals for each pair of bits can then ripple independently through subsequent stages so that the time delay of the entire adder will be substantially reduced over the prior art, while at the same time the circuit complexity can be kept relatively low. This technique is also shown adapted to produce either an incrementor or a priority encoder. 
     Since the technique is based on a relatively small number of cell types, the cells can readily be combined in an ordered manner as shown to produce an adder, incrementor, or priority encoder of any length. Thus, not only is it possible to produce a circuit with high absolute speed, it is also possible to produce a device with low design complexity and cost when implemented in LSI by either bipolar or MOS techniques. 
     DETAILED DESCRIPTION OF THE INVENTION 
     The present invention discloses two embodiments of a new and novel technique for performing N-bit addition which are called the &#34;conditional carry&#34; adder. Both of these techniques, &#34;A&#34; and &#34;B&#34;, can also be applied to incrementors and priority encoders as well as adders as will be shown. As can be seen in Table 2, the conditional carry adder compares favorably to the previously known techniques. In Table 2 adder speed is stated in terms of the number of gate delays required for the total addition. The data shown is for a 32-bit adder. 
     FIGS. 3A and 3B show the first embodiment of the claimed invention, the conditional carry adder &#34;A&#34;, and Table 3 presents the related Boolean equations. The three different cell types are shown in FIG. 3A: A &#34;start&#34; cell, zero to any number of &#34;continue&#34; cells, and an &#34;end&#34; cell. FIG. 3B shows how these cells are arranged to form, for example, a 9-bit adder. In this example each block contains between two and four one-bit cells, with two cells in block 0, three cells in block 1, and four cells in block 2. Thus, for example, in the second block (j=1), where there are three cells, bit number 2 is a start cell, bit number 3 is a continue cell, and bit number 4 is an end cell. 
     
                       TABLE 2______________________________________Method for  Total    Number of   Number ofPerforming  Number   Devices Per Bit                            Devices Per BitAddition    of Delays                Static NMOS Static CMOS______________________________________Ripple Adder       33       20          26Carry Look Ahead       16       24          32AdderConditional Sum       14       72          104AdderConditional Carry       12       28          38Adder-AConditional Carry        8       36          52Adder-B______________________________________ 
    
     
                       TABLE 3______________________________________For the whole adder:Cinblock(0) = CinadderFor each block j:Cin0(0) = 0Cin1(0) = 1Coutblock(j) = Cout0 (imax) + [Cout1(imax)*Cinblock(j)]= Cinblock(j+1)For each bit i of block j:K(i) = A(i) + B(i)G(i) = A(i) * B(i)P(i) = A(i) XOR B(i)Cout0(i) = G(i) + [K(i) * Cin0(i)] = Cin0 (i+1)Cout1(i) = G(i) + [K(i) * Cin1(i)] = Cin1 (i+1)Cin(i) = Cin0(i) + [Cin1(i) * Cinblock(j)]Sum(i) = P(i) XOR Cin(i)______________________________________ 
    
     Fundamentally, each block, j=0-2 in the example, generates two ripple carry output signals Cout0(i) and Cout1(i). Note that the Cin0 and Cin1 for the start cell of each block is defined as 0 and 1 respectively. The Cout signals are combined with the carry-in signal to the current block Cinblock(j) to produce the carry-out signal of the current block Coutblock(j). All of the blocks j=0-2 begin rippling their two carry chains at the same time. Block 0 produces its carry-out signal first and passes it on to block 1. Thereafter, only one gate delay is required for the carry to &#34;jump&#34; across each block. Since the block size increases as an arithmetic progression (i.e., 2, 3, 4 and so forth), the total delay is approximately proportional to the square root of the number of bits to be added. Thus, the conditional carry adder &#34;A&#34; gives 25% better performance than the carry look adder with only a 17% increase in the number of devices per bit. Also, the conditional carry adder &#34;A&#34; can be implemented with one-bit cells, rather than cells which stretch across multiple bits as in other high speed techniques. This permits an ordered integrated circuit layout which is easy and space-efficient to implement. 
     The second embodiment of the invention, the conditional carry adder &#34;B&#34;, is shown in FIG. 4 and the related Boolean equations are shown in Table 4. Note that Table 4 is shown as a PASCAL-like language program for any length adder and &#34;2**j&#34; is equivalent to 2 raised to the jth power. The design is similar to the conditional carry adder &#34;A&#34; (FIGS. 3A and 3B) and in similar fashion the inputs are assumed to be Cin0=1 and Cin1=1 and the carry-out signals are computed accordingly. 
     
                       TABLE 4______________________________________N = #Bits in AdderFor i = 0 thru (N-1) DO BEGINCout0(0,i) = A(i) * B(i) = G(i)Cout1(0,i) = A(i) + B(i) = K(i)P(i) = A(i) XOR B(i)EndFor j = 1 thru LOG2(N) DO BEGINW = 2**jFor K = 0 thru (N/W -1) DO BEGINL0 = K*WL1 = (K*W + W/2)L2 = (K*W + W)For i = (L0) thru (L1-1) DO BEGINCout0(j,i) = Cout0(j-1, i)Cout1(j,i) = Cout1(j-1, i)EndFor i = (Ll) thru (L2-1) DO BEGINCout0(j,i) = Cout0(j-1, i) + [Cout1(j-1, i) * Cout0(j-1, L1-1)]Cout1(j,i) = Cout0(j-1, i) + [Cout1(j-1, i) * Cout1(j-2, L1-1)]EndEndEndCin(0) = CinAdderK = LOG2(N)For i = 0 thru (N-1) DO BEGIND(i) = P(i) XOR Cin(i)Cin(i+1) = Cout0(K,i) + [Cout1(K,i) * CinADDER]EndCoutADDER = Cin(N)______________________________________ 
    
     In FIG. 4 each stage generates the carry-out signals for each bit Cout0(j,i) and Cout1(j,i) assuming that the carry-in signals to that bit are zero and one respectively, where &#34;j&#34; is the stage number and &#34;i&#34; is the bit number. The object is to generate the carry-in signals for each bit as if the carry-in signals to the entire block of bits are a one and a zero respectively. The successive stages perform this function, as well as generating the carry-out signals for the block, Cout1 and Cout0. 
     FIG. 4 shows that when the final carry-in signals for each bit are generated, the carry-in signal for the adder selects the correct carry-in signal for each bit, and Cin is exclusive-ORed with the appropriate P-bit P(0-7) to produce the final sum D(0-7). 
     As can be seen from FIG. 4 the major difference between embodiment &#34;B&#34; and embodiment &#34;A&#34; is that in &#34;B&#34; the block sizes increase as powers of two, which forms a geometric progression whereas the block size of embodiment &#34;A&#34; forms an arithmetic progression as discussed above. The total delay in embodiment &#34;B&#34; is thus proportional to the logarithm to the base two of the number of bits to be added. 
     The technique of both adders &#34;A&#34; and &#34;B&#34; can be adapted to produce both an incrementor or a priority encoder. An incrementor is a device for adding 1 to a prior N-bit number; and a priority encoder is a device that encodes the highest priority input of N bits to a coded output having fewer than N bits to which a numerical weight has been assigned (e.g., an eight-digit to three-digit encoder or a 10-digit to 4-digit encoder). 
     FIG. 5 shows an incrementor using the conditional carry &#34;B&#34; technique. Since none of the B(0-7) inputs are used in an incrementor, they can be set to zero and when B=0: 
     
         G=A*B=0 
    
     
         K=A+B=A 
    
     
         P=A XOR B=A 
    
     In like fashion the Cin signal can be set to 1 for an incrementor if the incrementor is always to be enabled. Thus, all of the logically redundant gates can be removed from the conditional carry adder &#34;B&#34; shown in FIG. 4 to form an incrementor &#34;B&#34; as shown in FIG. 5. This same technique for removal of redundant gates can be used as shown in FIGS. 6 and 6A to create an incrementor &#34;A&#34; based on the conditional carry adder &#34;A&#34; of FIG. 3A. As with the adder of FIGS. 3A and 3B the Continue cell of FIG. 6 can be used many times as needed in each block. 
     FIG. 7 shows an eight-digit to three-digit priority encoder using the conditional carry &#34;B&#34; technique. As with the incrementors discussed above, the B(0-7) inputs are set to zero and the carry-in signal is set to 1. Note that in this embodiment the carry-in signal is shown as an &#34;enable&#34; and has been inverted for convenience as ENABLE=0. Tri-state buffers 30 have been included in each output cell which are enabled by the corresponding gates 40. The logic elements in the first four rows insure that the only buffers 30 which will be enabled correspond to the most significant bit in the input operand having a value equal to one. The inputs to each tri-state buffer 30 in each output cell are hard wired to the appropriately binary weighted signals corresponding to the bit number of the respective operand inputs. Thus, for a three digit output each of the buffers 30 is formed by three buffers wired in parallel to form three output ENCODE lines. The tri-state buffers 30 in the A(0) column are then set to 0,0,0, the buffers 30 in the A(1) column are set to 0,0,1, and so forth up to the buffers 30 in the A(7) column being set to 1,1,1. The eight buffers 30 (one from each column) corresponding to the least significant inputs are then wired together to form the ENCODE(0) output, the eight buffers 30 (one from each column) corresponding to the intermediate weighted inputs are wired together to form the ENCODE(1) output, and the eight buffers 30 (one from each column) corresponding to the most significant inputs are wired together to form the ENCODE(2) output. Hence, the three encode lines provide the properly weighted outputs to perform the 8-bit to 3-bit encoder function and the properly enabled buffers provide the required priority corresponding to the most significant one in the input word. As with the incrementors discussed above the technique for removal of redundant gates, along with the addition of the appropriate number tri-state buffers per bit can be used as shown in FIGS. 8 and 8A to create a priority encoder &#34;A&#34; based on the conditional carry adder &#34;A&#34; of FIG. 3A. Once again the Continue cell of FIG. 8 can be used many times as needed in each block.