advertisement

1-Bit Adder (Half Adder) Simplest case - when two one bit numbers are to be added. With one bit - only the numbers 0 and 1 can be represented. Following table shows all possible scenarios Binary/Decimal Inputs Decimal Result Binary Result A B D X1 X0 0 0 0 00 0 1 1 01 1 0 1 01 1 1 2 10 The least significant bit of the output, X0, is the result of XOR-ing the inputs. The other bit, X1, results from AND-ing A and B. Bit X1 is called the carry bit. Sum = A’B + AB’ = A B Carry = AB The following circuit can be used to construct a half-adder. Half Adder Full Adder When two (or more) bit binary numbers are added - the problem is somewhat more complicated. Example: Add binary representations of 3 (11) and 1 (01). 1 1 (3) + 0 1 (1) 1 1 (carry) 1 0 0 (result) In this example, for all but the rightmost bit, not two but three bits must be added. The carry bit from the previous bit addition must be reflected. The truth table for the full adder (with carry input) is A B Carry_in Carry_out S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1 The carry bit Carry_out is 1 if o both A and B are 1, or o exactly one of A and B is 1 and the input carry, Carry_in , is 1. The sum bit S is 1 if an odd number of the three inputs is on, i.e., S is the XOR of the three inputs. Hence, the full adder can be realized as shown below. Notice that the full adder can be constructed from two half adders and an OR gate. C = Carry_in, Sum = A’B’C + A’BC’ + AB’C’ + ABC = (A B ) C Carry_out = AB + C(A B) Full Adder N-bit Ripple Carry adder Adders for arbitrarily large binary numbers can be constructed by cascading full adders. The carry bit ``ripples'' from one stage to the next. A drawback of this circuit is that the carry information has to propagate through all stages. I.e., there is an electrical path from A0 and B0 to S5 in the diagram below. This path traverses 2N-1 gates in an N-bit adder. This may lead to undesirably long delays before the output stabilizes. 4-Bit Ripple Carry Adder For “Adder Circuit” Simulations : Go to http://isweb.redwoods.cc.ca.us/INSTRUCT/CalderwoodD/diglogic/full.htm