A lookahead carry unit (LCU) is a logical unit in digital circuit design used to decrease calculation time in adder units and used in conjunction with carry look-ahead adders (CLAs).
A single 4-bit CLA is shown below:
By combining four 4-bit CLAs, a 16-bit adder can be created but additional logic is needed in the form of an LCU.
The LCU accepts the group propagate ( P G ) and group generate ( G G ) from each of the four CLAs. P G and G G have the following expressions for each CLA adder:
P G = P 3 ⋅ P 2 ⋅ P 1 ⋅ P 0 G G = G 3 + P 3 ⋅ G 2 + P 3 ⋅ P 2 ⋅ G 1 + P 3 ⋅ P 2 ⋅ P 1 ⋅ G 0 The LCU then generates the carry input for each CLA.
Assume that P i is P G and G i is G G from the ith CLA then the output carry bits are
C 4 = G 0 + P 0 ⋅ C 0 C 8 = G 4 + P 4 ⋅ C 4 C 12 = G 8 + P 8 ⋅ C 8 C 16 = G 12 + P 12 ⋅ C 12 Substituting C 4 into C 8 , then C 8 into C 12 , then C 12 into C 16 yields the expanded equations:
C 4 = G 0 + P 0 ⋅ C 0 C 8 = G 4 + G 0 ⋅ P 4 + C 0 ⋅ P 0 ⋅ P 4 C 12 = G 8 + G 4 ⋅ P 8 + G 0 ⋅ P 4 ⋅ P 8 + C 0 ⋅ P 0 ⋅ P 4 ⋅ P 8 C 16 = G 12 + G 8 ⋅ P 12 + G 4 ⋅ P 8 ⋅ P 12 + G 0 ⋅ P 4 ⋅ P 8 ⋅ P 12 + C 0 ⋅ P 0 ⋅ P 4 ⋅ P 8 ⋅ P 12 C 4 corresponds to the carry input into the second CLA; C 8 to the third CLA; C 12 to the fourth CLA; and C 16 to overflow carry bit.
In addition, the LCU can calculate its own propagate and generate:
P L C U = P 0 ⋅ P 4 ⋅ P 8 ⋅ P 12 G L C U = G 12 + G 8 ⋅ P 12 + G 4 ⋅ P 8 ⋅ P 12 + G 0 ⋅ P 4 ⋅ P 8 ⋅ P 12 + C 0 ⋅ P 0 ⋅ P 4 ⋅ P 8 ⋅ P 12 = C 16 By combining 4 CLAs and an LCU together creates a 16-bit adder. Four of these units can be combined to form a 64-bit adder. An additional (second-level) LCU is needed that accepts the propragate ( P L C U ) and generate ( G L C U ) from each LCU and the four carry outputs generated by the second-level LCU are fed into the first-level LCUs.