Electronics/Adders

From testwiki
Revision as of 04:11, 9 July 2007 by 209.226.116.48 (talk) (Adders)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Nav

Adders


Clearly adding using digital circuitry is possible. Addition is one of the most fundamental operations that the computer you are reading this on is based. This module discusses the required properties of half and full adders then an implementation of them.

First a bit of revision of binary addition.

1+0=1=0+1
1+1=10
0+0=0

This means that if we add 1101101 to 0111010. It precedes exactly like long arithmetic with a decimal radix. That is why we start at the right and add the two digits, if there is a carry we write it above the next digit, then we repeat the same thing this time including the carry in the calculation. Below is an example of this. It is best to do this on paper of your own until you understand.

011111011101
00111010
10100111

Half Adders

Clearly a half adder is the first step, the right most and first addition, in the long addition. The truth table for the addition show

Half Adder
A B X
0 0 0
0 1 1
1 0 1
1 1 0
Table 1: The truth table of a Half adder.

This is this truth table is identical to an Exclusive OR between A and B. (A xor B) ⇔ (A AND NOT B) OR (NOT A AND B) ⇔ (A OR B) AND (NOT A OR NOT B) ⇔ (A OR B) AND NOT (A AND B) This means the boolean Algebra representation of this is

(A¬B)¬(AB)
(AB)(¬A¬B)
(AB)¬(AB)

Or

A.B¯+A.B¯
(A+B).(A¯+B¯)
(A+B).(A.B¯)

But is generally just written as

AB

Full Adders

A Full Adder is a three way addition, i.e it is the addition of the carry to the other two digits. But a carry result is also required. So firstly for the carry the truth table is shown in Table 2.

Carry
A B D Carry
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
Table 2: The truth table of the carry operation.

The carry operation is just A AND B OR A AND D OR D AND B. Which is written in Boolean Algebra in one of the two below ways. This is easily seen from a Karnaugh map. But it can also be seen from the truth table. If two of the three inputs, A,B or D, are one then the carry must be one. But there are three combinations of this. When A and B are one; A and D are one; and B and D are one. These cases are linked together with an three way OR because we want to combine all of these cases.

ABADBD

Or

A.B+A.D+B.D
Addition
A B C Addition Carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Table 3: The truth of the Addition operation.

The addition operation is just an A XOR B XOR C. Which is written as

ABC

This can also be expressed as fundamental boolean operator, as ORs, ANDs and NOTs. If we take this all straight from the truth table. The logic is

ABCA¬B¬C¬AB¬C¬A¬BC

Or

A.B.C+A.B¯.C¯+A¯.B.C¯+A¯.B¯.C