Consider a carry look ahead adder for adding two -bit integers, built using gates of fan-in at most two. The time to perform addition using this adder is
View worked solution
Answer: B
To find the time complexity of an -bit carry look-ahead adder (CLA) built using gates with a maximum fan-in of 2, we can break down the addition process into three main steps:
-
Generation of Propagate () and Generate () signals:
For each bit , we compute: Since these depend only on the local input bits and , they can be computed in parallel in time using 2-input gates.
-
Carry Computation:
The carry for each stage is computed using the recurrence relation: Computing all carries is a prefix computation problem. Since the maximum fan-in of the gates is limited to , any circuit combining variables to compute the carries must have a tree-like structure (such as a Brent-Kung or Kogge-Stone prefix tree).
The depth of a binary tree with inputs is . Therefore, the time required to propagate and compute all carry signals is .
-
Sum Computation:
Once the carries are available, the sum bits are computed as: This step takes time using 2-input XOR gates.
Conclusion:
The total time complexity is dominated by the carry computation step, which is .
Free practice · Your answers on this page are not saved.
