Skip to content
Official PYQ · 2016

GATE CS 2016 Set 2 Q07 — Computer Arithmetic

Explain with AI
Consider an eight-bit ripple-carry adder for computing the sum of AA and BB, where AA and BB are integers represented in 22's complement form. If the decimal value of AA is one, the decimal value of BB that leads to the longest latency for the sum to stabilize is ___________
View worked solution

Answer: -1

In an nn-bit ripple-carry adder, the latency (propagation delay) is maximized when a carry is generated at the least significant bit (LSB) and must propagate through all subsequent stages to the most significant bit (MSB).

For any stage ii (where 0≤i≤70 \le i \le 7):

  • Carry Generation (GiG_i): A carry is generated if Ai⋅Bi=1A_i \cdot B_i = 1.
  • Carry Propagation (PiP_i): An incoming carry is propagated to the next stage if Ai⊕Bi=1A_i \oplus B_i = 1.

To achieve the longest latency:

  1. A carry must be generated at stage 00: G0=A0⋅B0=1G_0 = A_0 \cdot B_0 = 1
  2. The carry must propagate through all remaining stages 11 to 77: Pi=Ai⊕Bi=1for i∈{1,2,…,7}P_i = A_i \oplus B_i = 1 \quad \text{for } i \in \{1, 2, \dots, 7\}

Given that the decimal value of AA is 11, its 88-bit binary representation is: A=000000012A = 00000001_2 This gives A0=1A_0 = 1 and Ai=0A_i = 0 for 1≤i≤71 \le i \le 7.

Applying our conditions to find the bits of BB:

  • For stage 00: We need A0⋅B0=1  ⟹  1⋅B0=1  ⟹  B0=1A_0 \cdot B_0 = 1 \implies 1 \cdot B_0 = 1 \implies B_0 = 1.
  • For stages 1≤i≤71 \le i \le 7: We need Ai⊕Bi=1  ⟹  0⊕Bi=1  ⟹  Bi=1A_i \oplus B_i = 1 \implies 0 \oplus B_i = 1 \implies B_i = 1.

Thus, all bits of BB must be 11: B=111111112B = 11111111_2 In 88-bit 22's complement representation, the binary value 11111111211111111_2 represents the decimal integer −1-1.

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

Published
Report a correction
Keep exploringMore Computer Arithmetic questions