Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

GATE | GATE-CS-2016 (Set 1) | Question 43

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Consider a carry lookahead adder for adding two n-bit integers, built using gates of fan-in at most two. The time to perform addition using this adder is
(A) Θ(1)
(B) Θ(Log (n))
(C) Θ(√ n)
(D) Θ(n)

Answer: (B)

Explanation: Look ahead carry generator gives output in constant time if fan-in = number of inputs.

For Example:

It will take O(1) to calculate 
c4 = g3 + p3g2 + p3p2g1 + p3p2p1g0 + p3p2p1p0c0c4 
   = g3 + p3g2 + p3p2g1 + p3p2p1g0 + p3p2p1p0c0, 
              if OR gate with 5 inputs is present.

And, if fan-in != number of inputs then we will have delay in each level, as given below.

If we have 8 inputs, and OR gate with 2 inputs, to build an OR gate with 8 inputs, we will need 4 gates in level-1, 2 in level-2 and 1 in level-3. Hence 3 gate delays, for each level.

Similarly an n-input gate constructed with 2-input gates, total delay will be O(log n).

// This Explanation has been provided by Saksham Raj Seth.

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 19 Nov, 2018
Like Article
Save Article
Similar Reads