##### look ahead carry generator

In a look-ahead carry generator, the carry generate function G_{i} and the carry propagate function P_{i} for inputs A_{i} and B_{i} are given by:

P_{i}= A_{i}⨁ B_{i}and G_{i}= A_{i}B_{i}

The expressions for the sum bit S_{i} and the carry bit C_{i+1} of the look-ahead carry adder are given by:

S_{i}= P_{i}⨁ C_{i}and C_{i+1}= G_{i}+ P_{i}C_{i}, where C_{0}is the input carry.

Consider a two-level logic implementation of the look-ahead carry generator. Assume that all P_{i}and G_{i} are available for the carry generator circuit and that the AND and OR gates can have any number of inputs. The number of AND gates and OR gates needed to implement the look-ahead carry generator for a 4-bit adder with S3, S2, S1, S0 and C4 as its outputs are respectively:

ans:10,4 can sum1 explain this plz

c2 = g1 + p1g0 + p1p0c0

= 2 AND, 1 OR

c3 = g2 + p2g1 + p2p1go + p2p1p0c0

= 3 AND, 1 OR

c4 = g3 + p3g2 + p3p2g1 + p3p2p1g0 + p3p2p1p0c0

= 4 AND, 1 OR

Total AND gates =1+2+3+4 = 10

Total OR gates = 1+1+1+1 = 4

Look ahead carry is only responsible for generate carry. Sum part is handled by adder part.