3.2.Introduction to Digital System
\(3.2.\)Introduction to Digital System
1.Logic gate representation
2.Using boolean algebra to simplify circuits
3.Build an Adder
\(a.\)Half adder
A half adder's output consists of:
- The sum. It can be computed by
xor
method. - The carry. It can be computed by
and
method.
\(b.\)Full adder
To implement full adder, we just need to add A
,
B
and the carry at the position \(C_i\).
The output of a full adder is the same as the half adder. Then how can we calculate each of them?
For \(C_0\), it's decided by the sum of
A
andB
& the current carry in the position. There are two cases that make the carry 1:A + B
is 1, and current carry is 1.A + B
is 2, and current carry can be 0 or 1.
So we can compute \(C_0\) by this expression:
\[ C_0 = C_i(A+B) + AB \]
- The sum is easy, it becomes 1 when 1 or 3 of
A
,B
and current carry is 1:
\[ S = A \; xor B \; xor C_i \]
{{c.}}4-bit Adder
To make a multi-bit Adder, we simply connect full adder together: