Adders
Adders
Adders
org/wiki/Adder_%28electronics%29
Half adder
A half adder is a logical circuit that performs an addition operation on two one
one--bit binary
numbers often written as A and B B.. The half adder output is a sum of the two inputs usually
represented with the signals Cout and S where . Following is the logic
table for a half adder:
Inputs Outputs
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
As an example, a Half Adder can be built with an XOR gate and an AND gate.
___________
A ------| |
| Half |-----
-----
| Adder |
| |-----
-----
B ------|___________|
A full adder is a logical circuit that performs an addition operation on three one
one--bit binary
numbers often written as A, B,, and Cin. The full adder produces a two-bit
bit output sum typically
represented with the signals Cout and S where . The full adder's truth
table is:
Inputs Outputs
A B Ci Co S
0 0 0 0 0
0 1 0 0 1
1 0 0 0 1
1 1 0 1 0
0 0 1 0 1
0 1 1 1 0
1 0 1 1 0
1 1 1 1 1
A full adder can be implemented in many different ways such as with a custom transistor-level
transistor
circuit or composed of other gates. One example implementation is with
and .
A full adder can be constructed from two half adders by connecting A and B to the input of one
half adder, connecting the sum from that to an input to the second adder, connecting Ci to the
other input and OR the two carry outputs. Equivalently, S could be made the three-bit XOR of A,
B, and Ci, and Co could be made the three-bit majority function of A, B, and Ci.