Home › Practice › RTL Design › Two half adders make a full adder
Two half adders make a full adder
EasyRTLcombinationalarithmetic
You already know how to add two bits with a half adder. Now you need to add three bits: a, b and a carry that arrives from the column on the right.
Concept first. A half adder takes two bits and gives a sum bit (1 when exactly one input is 1) and a carry bit (1 when both are 1). To add three bits, add two of them first with one half adder, then add the third bit to that sum with a second half adder. Each half adder may produce a carry, and both carries have the same weight. Ask yourself: can both carries be 1 at the same time? Try the worst case, 1 + 1 + 1.
What to build.
full_add(a, b, cin)adds three bits.- Outputs:
sandcout, so{cout, s} = a + b + cin. - No clock. You may write it any way you like. Building it from two small half-adder pieces is the idea to try.
No install and no sign-up needed. You write your answer in the editor and Nishkam checks it.