Parallel adder with carry precalculation

from Wikipedia, the free encyclopedia
4-bit carry-look-ahead adder with carry-in and carry-out

The parallel adder with carry pre-calculation or carry-look-ahead adder (CLA adder for short) is a logic circuit for adding multi-digit binary numbers (see also adder ).

The CLA adder adds two n-digit binary numbers, so it has 2 · n inputs and, as a rule, an additional carry input . Since the result may include a carry, there are n + 1 outputs. The advantage of the CLA adder is that the delay of the circuit is only logarithmic to the number of its inputs, with only a linear number of logic gates measured by the number of its inputs. Expressed in Landau notation , its complexity is therefore for the circuit delay and for the circuit size . The CLA adder is therefore as fast as a conditional sum adder , whose delay is also , and at the same time, similar to a carry ripple adder , requires only a few components. Compared to the CLA adder, however, conditional sum adders need more components, and carry ripple adders have an exponentially greater delay of . The CLA adder, on the other hand, is asymptotically fast and cheap at the same time.

idea

An adder can perform most of its calculations even if the incoming carry is not yet available. To do this, the two summands are first added without taking them into account. The result can then be seen directly what effect the incoming transfer will have on the outgoing one. The table shows the relationship using the example of a 4-bit adder.

Relationship between incoming and outgoing transfers of a 4-bit adder
Total without taking
the incoming carry forward into account
more detailed outgoing comment
transfer
0 0000 to 0 1110 any 0 The incoming carry is absorbed .
0 1111 0 0 The incoming carry is propagated unchanged .
1 1
1 0000 to 1 1110 any 1 A carry is always generated .

Each adder indicates at a special output whether it will absorb, propagate or generate the incoming carry. This special output replaces the carry output of an ordinary adder. The actual carry can then easily be calculated from this information and the incoming carry. The great advantage of this special output is that it can be hierarchically combined with just a few logic gates without having to recalculate the total or know the actual carry, as the following table shows.

Combination of two adding units to form a wider adding unit
higher quality
adder
low-order
adder
combined
adder
absorbed any absorbed
generated any generated
propagated absorbed absorbed
generated generated
propagated propagated

functionality

The CLA adder is a special application of a parallel prefix calculation which can be implemented by a circuit with costs and delay . In order to make the ingenious application of the parallel prefix calculation easier to understand, its application will first be explained using the example of a fast incrementer .

Fast CLA-style incrementer

An incrementer adds the value to a -digit binary number and has inputs as well as outputs and a further output for a possible carry with the highest priority.

A carryover from position to only occurs when all are, i.e. H. when they propagate the transfer . In the case of the incrementer, the following applies for each result bit if and only if either propagate or for .

Using a parallel prefix calculation , one can calculate the functions " propagate" at the same time by taking advantage of the fact that the logical AND function is an associative two-digit link on the binary numbers.

Parallel prefix calculation

For each associative two-digit link on a set , its -digit parallel prefix function is defined as follows:

with for

The circuit can be constructed recursively from :

For was then:

For
For

Example: therefore applies to

CLA adder

Let and be the digits of the two numbers to be added and the input carry. With denotes the carry bit from place to place . Then applies to the -th sum bit to be calculated . If all carry bits are known, they can be calculated in parallel, with constant switching delay and linear component costs.

In order to calculate this, it is not enough to check whether the input carry is being propagated, as with the incrementer. Because a carry is propagated at the -th place if either or are, a carry is still generated if .

If the -th digit propagates a carry, you write :

For

If the -th digit generates a carry , you also write :

For

Both propagating and generating can be calculated without knowing the carries !

To all transfers for calculating at the same time efficiently, one defines an associative link (proof associativity by recalculation) which are in a parallel prefix computation can use:

The two components are explained as follows. It is the carry-over if the -th position generates or if the -th position propagates and the -th position has a carry-over, i.e. if . Successive passages together propagate a carryover if is. The link is therefore suitable for calculating all of them as follows; they are pure auxiliary variables:

, or in other words:

With the intermediate results now available, the sum of and can finally be easily calculated. The following applies:

For

literature

  • Jörg Keller, Wolfgang J. Paul: Hardware Design. Formal design of digital circuits Teubner 1995/2005, ISBN 3-519-23047-X .

Web links