Skip to content
Official PYQ · 2006

GATE CS 2006 Q36 — Computer Arithmetic

Explain with AI

Given two three bit numbers a2a1a0a_{2}a_{1}a_{0} and b2b1b0b_{2}b_{1}b_{0} and cc the carry in, the function that represents the carry generate function when these two numbers are added is: 

Choose one option
View worked solution

Answer: A

The carry-generate function GG for a multi-bit adder represents the condition under which a carry-out is generated by the addition of two numbers, independent of the external carry-in (c=0c = 0).

For two 3-bit numbers A=a2a1a0A = a_2 a_1 a_0 and B=b2b1b0B = b_2 b_1 b_0, the carry-out c3c_3 from a Carry Lookahead Adder is given by:

c3=g2+p2g1+p2p1g0+p2p1p0cc_3 = g_2 + p_2 g_1 + p_2 p_1 g_0 + p_2 p_1 p_0 c

Setting the carry-in c=0c = 0, the carry-generate function GG is:

G=g2+p2g1+p2p1g0G = g_2 + p_2 g_1 + p_2 p_1 g_0

Using the standard definitions for bit-level generate (gig_i) and propagate (pip_i) functions:

  • gi=aibig_i = a_i b_i
  • pi=ai+bip_i = a_i + b_i

Substituting these into the expression for GG:

G=a2b2+(a2+b2)(a1b1)+(a2+b2)(a1+b1)(a0b0)G = a_2 b_2 + (a_2 + b_2)(a_1 b_1) + (a_2 + b_2)(a_1 + b_1)(a_0 b_0)

Expanding the terms step-by-step:

  1. First term: a2b2a_2 b_2
  2. Second term: (a2+b2)a1b1=a2a1b1+a1b2b1(a_2 + b_2)a_1 b_1 = a_2 a_1 b_1 + a_1 b_2 b_1
  3. Third term: (a2+b2)(a1+b1)a0b0=(a2a1+a2b1+a1b2+b2b1)a0b0=a2a1a0b0+a2a0b1b0+a1a0b2b0+a0b2b1b0\begin{aligned} (a_2 + b_2)(a_1 + b_1)a_0 b_0 &= (a_2 a_1 + a_2 b_1 + a_1 b_2 + b_2 b_1)a_0 b_0 \\ &= a_2 a_1 a_0 b_0 + a_2 a_0 b_1 b_0 + a_1 a_0 b_2 b_0 + a_0 b_2 b_1 b_0 \end{aligned}

Combining all the expanded terms gives:

G=a2b2+a2a1b1+a2a1a0b0+a2a0b1b0+a1b2b1+a1a0b2b0+a0b2b1b0G = a_2 b_2 + a_2 a_1 b_1 + a_2 a_1 a_0 b_0 + a_2 a_0 b_1 b_0 + a_1 b_2 b_1 + a_1 a_0 b_2 b_0 + a_0 b_2 b_1 b_0

This matches Option A.

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

Published
Report a correction
Keep exploringMore Computer Arithmetic questions