In a look-ahead carry generator, the carry generate function Gi and carry propagate function Pi for inputs Ai and Bi are given by Pi=Ai⊕Bi and Gi=AiBi. The sum bit Si and carry bit Ci+1 are Si=Pi⊕Ci and Ci+1=Gi+PiCi, where C0 is the input carry. Consider a two-level logic implementation of the look-ahead carry generator for a 4-bit adder (assume Pi and Gi are already available, and AND/OR gates can have any number of inputs). The number of AND gates and OR gates needed to implement the carry generator (producing C1,C2,C3,C4) are respectively:
- A6, 3
- 10, 4
- C6, 4
- D10, 5
Explanation
Expanding: C1=G0+P0C0 (1 AND, 1 OR). C2=G1+P1G0+P1P0C0 (2 ANDs, 1 OR). C3=G2+P2G1+P2P1G0+P2P1P0C0 (3 ANDs, 1 OR). C4=G3+P3G2+P3P2G1+P3P2P1G0+P3P2P1P0C0 (4 ANDs, 1 OR). Total ANDs = 1+2+3+4 = 10, total ORs = 4.
Source: GATE CS 2007 (2007)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.