Skip to content
Official PYQ · 2007

GATE CS 2007 Q35 — Computer Arithmetic

Explain with AI

In a look-ahead carry generator, the carry generate function GiG_i and the carry propagate function PiP_i for inputs AiA_i and BiB_i are given by:

Pi=Ai⊕Bi and Gi=AiBiP_i = A_i \oplus B_i \text{ and }G_i = A_iB_i

The expressions for the sum bit SiS_i and the carry bit Ci+1C_{i+1} of the look ahead carry adder are given by:

Si=Pi⊕Ci and Ci+1=Gi+PiCi, where C0 is the input carry.S_i = P_i \oplus C_i \text{ and } C_{i+1} = G_i + P_iC_i, \text{ where }C_0 \text{ is the input carry}.

Consider a two-level logic implementation of the look-ahead carry generator. Assume that all PiP_i and GiG_i are available for the carry generator circuit and that the AND and OR gates can have any number of inputs. The number of AND gates and OR gates needed to implement the look-ahead carry generator for a 44-bit adder with S3,S2,S1,S0S_3, S_2, S_1, S_0 and C4C_4 as  its outputs are respectively:

Choose one option
View worked solution

Answer: B

In a 4-bit look-ahead carry adder, the carry generator unit is responsible for generating the carry signals C1,C2,C3,C_1, C_2, C_3, and C4C_4 in parallel. The sum bits SiS_i are generated outside this unit using XOR gates.

Using the recursive relation Ci+1=Gi+PiCiC_{i+1} = G_i + P_i C_i, we can write the two-level Sum-of-Products (SOP) expressions for each carry output as follows:

  • For C1C_1: C1=G0+P0C0C_1 = G_0 + P_0 C_0
    • Number of AND gates = 11 (for P0C0P_0 C_0)
    • Number of OR gates = 11 (to sum 22 terms)
  • For C2C_2: C2=G1+P1G0+P1P0C0C_2 = G_1 + P_1 G_0 + P_1 P_0 C_0
    • Number of AND gates = 22 (for P1G0P_1 G_0 and P1P0C0P_1 P_0 C_0)
    • Number of OR gates = 11 (to sum 33 terms)
  • For C3C_3: C3=G2+P2G1+P2P1G0+P2P1P0C0C_3 = G_2 + P_2 G_1 + P_2 P_1 G_0 + P_2 P_1 P_0 C_0
    • Number of AND gates = 33 (for P2G1P_2 G_1, P2P1G0P_2 P_1 G_0, and P2P1P0C0P_2 P_1 P_0 C_0)
    • Number of OR gates = 11 (to sum 44 terms)
  • For C4C_4: C4=G3+P3G2+P3P2G1+P3P2P1G0+P3P2P1P0C0C_4 = G_3 + P_3 G_2 + P_3 P_2 G_1 + P_3 P_2 P_1 G_0 + P_3 P_2 P_1 P_0 C_0
    • Number of AND gates = 44 (for P3G2P_3 G_2, P3P2G1P_3 P_2 G_1, P3P2P1G0P_3 P_2 P_1 G_0, and P3P2P1P0C0P_3 P_2 P_1 P_0 C_0)
    • Number of OR gates = 11 (to sum 55 terms)

Summing these up for the entire carry generator:

  • Total AND gates: 1+2+3+4=101 + 2 + 3 + 4 = 10
  • Total OR gates: 1+1+1+1=41 + 1 + 1 + 1 = 4

Therefore, the number of AND and OR gates needed are 10 and 4 respectively.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Computer Arithmetic questions