Logic Design Lab 3. Full Adder Chun

advertisement
Lab 1. Full Adder
Presenter: Chun-Hsien Ko
Contributors:
Chung-Ting Jiang and Lin-Kai Chiu
Dept. of Electrical and Computer Eng., NCTU
1
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
Outlines

Adder




How to Design a Logic Circuit
Half Adder and Full Adder
DIP Switch
Lab 3: 1-bit Full Adder
Dept. of Electrical and Computer Eng., NCTU
2
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
Adder (Half Adder)
 Describing binary summation of two one-bit binary inputs





Two inputs x and y
Two outputs C(carry) and S(sum)
Carry (C) is represented the carry out bit
Sum (S) is represented the sum of x and y
Black box can be represented as
Dept. of Electrical and Computer Eng., NCTU
3
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
Design flow

Draw truth table



We have 2 inputs (x and y),
so there has 4 cases
List the corresponding output
(C and S)
x
y
C
S
0
0
1
1
0
1
0
1
0
0
0
1
0
1
1
0
Then output is sum of product


S = x’y + x y’
=xy
C=xy
x
y
x
S
y
y
C
x
Dept. of Electrical and Computer Eng., NCTU
4
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
How to cascade the half adder?
Cin

Describing binary summation of three one-bit inputs

Three inputs and two outputs

Black box can be represented as
Dept. of Electrical and Computer Eng., NCTU
5
Logic Design

Design flow

Draw truth table
Lab 3. Full Adder

Chun-Hsien Ko
Then output is sum of
product


S = x y’Cn’ + x’y’Cn + x
yCn + x’yCn’
= x  y  Cn
Cn+1 = xy + xCn + yCn
+xyCn
= xy + xCn + yCn
Dept. of Electrical and Computer Eng., NCTU
6
Logic Design
Lab 3. Full Adder
Chun-Hsien Ko
Using AND, OR, XOR to build a full adder
7432 (OR)
7408 (AND)

7486 (XOR)
Dept. of Electrical and Computer Eng., NCTU
7
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
DIP switch (指撥開關)

Switch the High/Low
voltage for Logic 1/0
Reserving the circuit of
DIP switch for following
experiments

The inner circuit of DIP switch

Dept. of Electrical and Computer Eng., NCTU
8
Logic Design

Lab 3. Full Adder
The related circuit of DIP switch



Chun-Hsien Ko
Connect to inputs
Use the 220Ω resistance
(Red-Red-Brown)
When the switch of pin 16
and pin 1 is connected,
the logic of input is “1”
When the switch of pin 16
and pin 1 is not connected,
the logic of input is “0”
Dept. of Electrical and Computer Eng., NCTU
9
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
Resistor Network (排阻)
Signal form here
Dept. of Electrical and Computer Eng., NCTU
10
Logic Design

Lab 3. Full Adder
Chun-Hsien Ko
Lab 3: 1-bit Full Adder

Use DIP switch as the input signal
Use LED to display the outputs (carry and sum)

Question: How to extend to N-bit Adder?

Dept. of Electrical and Computer Eng., NCTU
11
Download