- #1

coolmoniker

- 2

- 0

## Homework Statement

I have a book which says that the gate delay for generating C

_{i}is 2 log

_{r}(n) + 1, where r is the fan-in for each gate and n is the number of bits.

This implies that with a fan-in of 2 and 4 bits, the delay for a generating C

_{5}as shown below should be 5 gate delays. How is this possible?

## Homework Equations

For an

**n-bit carry lookahead adder**, it is well known that the carry out can be determined by examining the 'carry propagate' and 'carry generate' for each of the inputs. This allows the carry out to be expressed solely in terms of the input bits and carry-in.

As an example, the carry-out for a four bit adder is given by:

C

_{5}= G

_{4}+ P

_{4}G

_{3}+ P

_{4}P

_{3}G

_{2}+ P

_{4}P

_{3}P

_{2}G

_{1}+ P

_{4}P

_{3}P

_{2}P

_{1}C

Where

C is the carry in,

Carry propagate P

_{i}= A

_{i}+ B

_{i},

Carry generate G

_{i}= A

_{i}B

_{i}

## The Attempt at a Solution

**Initially:**

We have the inputs

C,

A

_{1},

B

_{1},

A

_{2},

B

_{2},

A

_{3},

B

_{3},

A

_{4},

B

_{4}

**After one gate delay:**

The carry-propagate and carry generate for each bit can be determined. So we have

C,

G

_{1},

P

_{1},

G

_{2},

P

_{2},

G

_{3},

P

_{3}, G

_{4}, P

_{4}

**After two gate delays:**

We can use 'and' to start the carry propagates and carry generates together. So we have

P

_{4}G

_{3},

P

_{4}P

_{3},

P

_{2}G

_{1},

P

_{2}P

_{1}

**After three gate delays:**

Now we can use 'or', and also continue 'anding' together the propogates

So

G

_{4}+ P

_{4}G

_{3},

P

_{4}P

_{3}G

_{2},

P

_{4}P

_{3}P

_{2}G

_{1},

P

_{4}P

_{3}P

_{2}P

_{1}

**After four gate delays:**

G

_{4}+ P

_{4}G

_{3}+ P

_{4}P

_{3}G

_{2},

P

_{4}P

_{3}P

_{2}G

_{1},

P

_{4}P

_{3}P

_{2}P

_{1}C

**After five gate delays:**

G

_{4}+ P

_{4}G

_{3}+ P

_{4}P

_{3}G

_{2}+ P

_{4}P

_{3}P

_{2}G

_{1},

P

_{4}P

_{3}P

_{2}P

_{1}C

This is too slow. There is still more work to be done as we need another 'OR' to put the two remaining terms together.

How is it possible to determine the carry out in only five gate delays?