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:
Pi = Ai ⨁ Bi and Gi = AiBi
The expressions for the sum bit S
i and the carry bit C
i+1 of the look-ahead carry adder are given by:
Si = Pi ⨁ Ci and Ci+1 = Gi + PiCi , where C0 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: