Open In App

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

Like Article
Like
Save
Share
Report

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


Last Updated : 19 Nov, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads