Carry Look Ahead Adder


Carry look ahead adder definition: Carry Look Ahead Adder (CLA Adder) (also known as Carry Look Ahead Generator) is one of the digital circuits used to implement addition of binary numbers. It is an improvement over 'Ripple carry adder' circuit. In Ripple Carry adders, carry propagation time is the major speed limiting factor as it works on the basic mechanism to generate carries as we generally do while adding two numbers using pen and paper. A ripple carry adder may be supposed to be built of a series of 1-bit adders (generally known as a full adder in digital electronics). Thus, the speed of ripple carry adder is a direct function of number of bits. On the other hand, Carry Look Ahead adder solves this problem by calculating carry signals in advance based upon input bits and does not wait for the input signal to propagate through different adder stages. Hence, it implements the adder with reduced delay at the cost of more area (as large combinational logic is required to calculate the look ahead carry as compared to propagated carry).


Full adder block diagramShown below is the truth table for a full adder (carry look ahead adder). Ai and Bi are two input bits and Ci is the carry input from the previous stage. Si (Sum) and Ci+1 (Carry out for the next stage) are the outputs for the next stage of the adder. As is evident, carry signal is generated if at least two inputs of full adder are 1 i.e.

  • When both bits Ai and Bi is 1 (regardless of Cin) OR
  • When one of the two inputs (Ai or Bi) is 1 and carry-in (carry of previous stage) is 1


Ai
Bi
Ci
Si
Ci+1
0
0
0
0
0
0
0
1
1
0
0
1
0
1
0
0
1
1
0
1
1
0
0
1
0
1
0
1
0
1
1
1
0
0
1
1
1
1
1
1


The outputs of this full adder, when expressed in the form of a boolean expression can be written as a function of inputs as follows: 
          
        Si = Ai xor Bi xor Ci
        Ci+1 = Ci(Ai xor Bi) + AiBi


Where Si is the sum bit calculated for nth adder stage and Ci+1 is the carry out from nth stage and will act as input for n+1th stage. For an N stage ripple carry adder, there is overhead of calculating the carry out of kth stage before carry out of k+1th stage can be calculated. If we go deeper into analysis, it comes out that ck+1 is a function of c0 and is discussed below. Let the intermediate outputs from a full adder stage be represented as Pi and Gi given as below:

          Pi = Ai xor Bi 
          Gi = Ai.Bi
          Si = Pi xor Ci
          Ci+1 = Ci.Pi + Gi


  •  Gi is known as carry generate signal since carry (Ci+1)is generated whenever Gi= 1 regardless of Ci
  • Pi is known as carry propagate signal since whenever Pi = 1, Ci+1 = Ci (when Pi=1, Gi = 0)
Thus, recursively replacing the values for Ci for each Ck, we can write the boolean expression of carry outputs of various stages in terms of C0 and Pk's as follows:

C1 = C0P0 + G0C2 = C1P1 + G1 = (C0P0+G0)P1 + G1 = C0P0P1 + P1G0 + G1C3 = C2P2 + G2 = (C0P0P1 + P1G0 + G1)P2+G2 = C0P0P1P2 + P2P1G0 + P2G1 +           G2C4 = C3P3 + G3 = (C0P0P1P2 + P2P1G0 + P2G1 + G2)P3 + G3 = C0P0P1P2P3 +             P3P2P1G0 + P3P2G1 + G2P3 + G3
Thus,
         Ci = F(P,G,C0)

4-bit carry look ahead block diagram
4-bit carry look ahead adder block diagram
In other words, carry signal is a direct SOP (Sum of Products) expression of C0 (usually 0) and input signals rather than its preceding carry signal. Let us illustrate taking a 4-bit adder as an example. This expression can be used to construct a carry look-ahead adder of any number of bits.

A 4 bit Carry Look Ahead (CLA) adder can be constructed with the help of following steps (Assuming T as the delay of a single 2-Input gate):
  1. Generate All P and G internal signals. These can be generated simultaneously as C0 and all inputs are available. 
  2. Generate all carry output signals (C1, C2, C3, C4). These will be valid after 3T time
  3. Generate Sum signals S = P xor C. It will be valid after 4T time.
Thus, Sum signals will be valid after a delay of 4T. On the other hand, delay expression in case of ripple carry adder = (2n+2)T. Thus, for n =4, i.e. for 4 bit ripple carry adder, delay will be 10T.

For higher order addition, boolean expression of carry output becomes more complex. So, there is tradeoff between area and speed. For larger number of bits, increase in area is more than speed advantage obtained. Hence, Carry Look Ahead adders are usually implemented as 4-bit modules that are used to build larger size adders.

Below is a nice video that explains about carry look ahead adders (taken from youtube).

Interesting Design Quiz - BCD multiply by five circuit

Problem – Make a digital circuit that takes a BCD digit as input and produces the output that is equal to 5 times the digit in same format.
Solution – Binary Coded Decimal (BCD) is the format to represent decimal numbers in binary form. In this format, each digit of the decimal number is coded separately into 4-bit binary number. So, only binary values from 0000 to 1001 are valid codes. E.g. A two digit decimal number will be coded into BCD code with 8 binary digits.
Binary multiplier for 5 times BCD multiplierSince, the circuit produces output that is 5 times the BCD digit, so, output value can contain maximum of 2 decimal digits OR 8 binary digits. Let I3-I0 be the 4-bit BCD digit input to the X5 multiplies and H3-H0 and L3-L0 be the 8-bit BCD output as shown in the figure below.


The truth table for X5 multiplier can be represented as shown in the figure below:



BCD
input
BCD
output
I3
I2
I1
I0
H3
H2
H1
H0
L3
L2
L1
L0
0
00
0
0
0
0
0
0
0
0
0
0
0
0
1
05
0
0
0
1
0
0
0
0
0
1
0
1
2
10
0
0
1
0
0
0
0
1
0
0
0
0
3
15
0
0
1
1
0
0
0
1
0
1
0
1
4
20
0
1
0
0
0
0
1
0
0
0
0
0
5
25
0
1
0
1
0
0
1
0
0
1
0
1
6
30
0
1
1
0
0
0
1
1
0
0
0
0
7
35
0
1
1
1
0
0
1
1
0
1
0
1
8
40
1
0
0
0
0
1
0
0
0
0
0
0
9
45
1
0
0
1
0
1
0
0
0
1
0
1
X
XX
1
0
1
0
X
X
X
X
X
X
X
X
X
XX
1
0
1
1
X
X
X
X
X
X
X
X
X
XX
1
1
0
0
X
X
X
X
X
X
X
X
X
XX
1
1
0
1
X
X
X
X
X
X
X
X
X
XX
1
1
1
0
X
X
X
X
X
X
X
X
X
XX
1
1
1
1
X
X
X
X
X
X
X
X





Drawing K-maps for all the outputs:

         
 K Map for H3, L3 and L1
 
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
 =>   H3 = L3= L1 = 0



Similarly, by solving using K-Maps for all the outputs, we get

H2 = I3

H1 = I2

H0 = I1

L2 = L0 = I0


Thus, all the outputs are either a direct connection from one of the inputs or zero. So, the whole function can be implemented without using a single logic gate. Sounds strange!!!

Can you come up with a better solution for this problem? Let us know with your comments.

Next read: Digital counters

Also read: