The Binary Adder |
Navigation |
|
|
The Binary Adder
Another common and very useful combinational logic circuit is that of the Binary Adder
circuit. The Binary Adder is made up from standard AND and Ex-OR gates and
allow us to "add" single bits of data together to produce two outputs, the SUM ("S") of the addition and a
CARRY ("C"). One of the main uses for the Binary Adder is in arithmetic and counting circuits.
Consider the addition of two denary (base 10) numbers below.
| 123 |
A |
(Augend) |
| + 789 |
B |
(Addend) |
| 912 |
SUM |
|
Each column is added together starting from the right hand side. As each column is added together a
carry is generated if the result is greater or equal to ten, the base number. This carry is then added to the result of
the addition of the next column to the left and so on, simple school math's addition. Binary addition is based on similar
principals but a carry is only generated when the result in any column is greater or equal to "2", the base number of
binary.
Binary Addition
Binary Addition follows the same basic rules as for the denary addition above
except in binary there are only two digits and the largest digit is "1", so any "SUM" greater than 1 will result in a
"CARRY". This carry 1 is passed over to the next column for addition and so on. Consider the single bit addition below.
| 0 |
0 |
1 |
1 |
| + 0 |
+ 1 |
+ 0 |
+ 1 |
| 0 |
1 |
1 |
10 |
The single bits are added together and "0 + 0", "0 + 1", or "1 + 0" results in a sum of "0" or "1" until
you get to "1 + 1" then the sum is equal to "2". For a simple 1-bit addition problem like this, the resulting carry bit
could be ignored which would result in an output truth table resembling that of an
Ex-OR Gate as seen in the Logic Gates
section and whose result is the sum of the two bits but without the carry. An Ex-OR gate only
produces an output "1" when either input is at logic "1", but not both. However, all microprocessors and electronic
calculators require the carry bit to correctly calculate the equations so we need to rewrite them to include 2 bits of
output data as shown below.
| 00 |
00 |
01 |
01 |
| + 00 |
+ 01 |
+ 00 |
+ 01 |
| 00 |
01 |
01 |
10 |
From the above equations we know that an
Ex-OR gate will
only produce an output "1" when "EITHER" input is at logic "1", so we need an additional output to produce a carry output,
"1" when "BOTH" inputs "A" and "B" are at logic "1" and a standard
AND Gate
fits the bill nicely. By combining the Ex-OR gate with the AND gate
results in a simple digital binary adder circuit known commonly as the "Half-Adder" circuit.
The Half-Adder Circuit
1-bit Adder with Carry-Out
| Symbol | Truth Table |
 |
A |
B |
SUM |
CARRY |
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 1 |
| Boolean Expression: Sum = A ⊕ B
Carry = A . B |
From the truth table we can see that the SUM (S) output is the result of
the Ex-OR gate and the Carry-out (CO) is the result of the
AND gate. One major disadvantage of the Half-Adder circuit when used as a binary adder, is
that there is no provision for a "Carry-in" from the previous circuit when adding together multiple data bits. For example,
suppose we want to add together two 8-bit bytes of data, any resulting carry bit would need to be able to "ripple" or move
across thebit patterns starting from the least significant bit (LSB). As the Half-Adder has no carry input the resultant added
value would be incorrect. One simple way to overcome this problem is to use a "Full-Adder" type binary adder circuit.
The Full-Adder Circuit
The main difference between the "Full-Adder" and the previous seen "Half-Adder" is that a Full-Adder
has 3-inputs, the two same data inputs "A" and "B" as before plus
an additional "Carry-In" (C-in) input as shown below.
Full-Adder with Carry-In
| Symbol | Truth Table |
 |
A |
B |
C-in |
Sum |
C-out |
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 1 |
| Boolean Expression: Sum = A ⊕ B ⊕ C-in |
The Full-Adder circuit above consists of three Ex-OR gates, two
AND gates and an OR gate. The truth table for the Full-Adder includes
an additional column to take into account the Carry-in input as well as the summed output and Carry-out. 4-bit Full-Adder
circuits are available as standard IC packages in the form of the TTL 74LS83 or the 74LS283 which can add together two
4-bit binary numbers and generate a SUM and a CARRY output.
|