Home › Practice › RTL Design › Carry passed hand to hand
Carry passed hand to hand
EasyRTLcombinationalarithmetic
Four people sit in a row. Each one adds a single column of two binary numbers and passes the carry to the next person, like a bucket chain.
Concept first. A ripple-carry adder is a row of full adders (a cell that adds a, b and a carry-in and gives a sum bit and a carry-out). The carry-out of column i is the carry-in of column i+1. Column 0 receives the outside cin, and the carry out of column 3 is the outside cout. The answer "ripples" from right to left, so the last column must wait for all the earlier ones. Building it yourself shows why that waiting makes big ripple adders slow.
What to build.
ripple4(a, b, cin)adds two 4-bit numbers and a carry-in.- Outputs:
sum[3:0]andcout, so{cout, sum} = a + b + cin. - No clock.
- Rule: do not use
+,-or comparisons. Build it from gates.
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.