19,142 views
68 votes
68 votes
Consider an eight-bit ripple-carry adder for computing the sum of $A$ and $B$, where $A$ and $B$ are integers represented in $2$'s complement form. If the decimal value of $A$ is one, the decimal value of $B$ that leads to the longest latency for the sum to stabilize is ___________

7 Answers

Best answer
67 votes
67 votes
Answer is $-1.$

In case of $-1$  we get bit sequence $11111111$ adding this we get a carry upto carry flag, so largest time to ripple!
edited by
42 votes
42 votes

In ripple-carry adder, the carry "ripples" from one bit to the next. The longest path delay through n-bit ripple carry adder is 2n gate delays.

For this condition (longest latency) to arise, we must ensure that a carry that is generated at the least significant bit is propagated throughout till the last bit. This means we must have Cin = 1 for every stage of the ripple-carry adder.

Given A = +1 (in 2's complement form), we just need to find what should be B in 2's complement form to satisfy the given condition.

A= 0000 0001  (given)

B= 1111 1111 ( -1 in decimal)

On adding A+B we get Cin = 1 at every stage with the last Cout = 1.         $\therefore$ Ans is  -1.

0 votes
0 votes
-1 and -127 both will give correct ans to this question.

-1 :    1111 1111
-1 :    1111 1111
+  : 1 1111 1110

-1     :     1111   1111
-127 :    1000 0001
+      : 1 1000 0000

In both cases carry is propagating throughout. In case of (-1,-1) sum is getting stabilized from 0000 0000 to 1111 11110

In case of (-1,-127) sum is getting stabilized from 0111 1110 to 1000 0000.
edited by
Answer:

Related questions

34 votes
34 votes
4 answers
1
Akash Kanase asked Feb 12, 2016
12,175 views
Let $X$ be the number of distinct $16$-bit integers in $2's$ complement representation. Let $Y$ be the number of distinct $16$-bit integers in sign magnitude representati...