Correct : F
Given:
Carry lookahead adder for adding two n-bit integers.
Gates have a maximum fan-in of 2.
To find:
The time required to perform the addition.
Solution:
Let me recall how carry lookahead adder works with restricted fan-in.
First, to compute the generate (gi = ai bi) and propagate (pi = ai ⊕ bi) terms for each bit, we only need 2-input gates.
So computing all gi and pi takes constant time, which is Θ(1).
Now, to compute the carries, each carry bit ci depends on up to i variables.
Since the fan-in of each gate is at most 2, an operation combining n inputs requires a binary tree of gates.
The height (or depth) of a balanced binary tree with n inputs is given by log2(n).
Thus, computing prefix carries using a tree structure takes time proportional to the depth of the tree, which is Θ(log n).
Finally, computing the sum bits si = pi ⊕ ci takes one more XOR gate delay, which is Θ(1).
Adding all these delays up, the total time required is:
Total time = Θ(1) + Θ(log n) + Θ(1) = Θ(log n).
Answer:
(B) Θ(log (n))
Similar Questions
Total Unique Visitors