### 上課投影片

```Logic Design Lab3

Equipment
• IC：
– 7408(AND) x 1
– 7432(OR) x 1
– 7486(XOR) x 1
– LED x 3
x
+ y
C S
x
y
Carry (C)
Half
Sum (S)
x
y
C
S
0
0
1
1
0
1
0
1
0
0
0
1
0
1
1
0
Sum of Products : S = x’y + x y’= x  y
C=xy
x
y
x
S
y
y
C
x
Why do we need Full Adder (FA) ?
ex: 1+1=10 Using HA is OK!
1
1 1
+1 1
1 1 0
HA is not enough!!!
We need a input Carry-in
x
y
Cn
Full
+
Cn+1
x
y
Cn
S
S
Cn+1
x
y Cn
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Cn+1 S
0
0
0
1
0
1
1
1
0
1
1
0
1
0
0
1
S = x y’Cn’ + x’y’Cn + x yCn + x’yCn’ = x  y  Cn
Cn+1 = x y + xCn + yCn = x y + Cn (x  y )
x
y
s
Cn
Cn+1
So many logic gates!!!
HA + HA = FA
x
Cn
x
y
x
y
S
Half
C
xy
y
S
Half
xy
x
y
Cn
S
Cn (x  y )
C
Cn+1 = x y + Cn (x  y )
S
Cn+1
Less logic gates!!!
Requirement
• Choose HA + HA = FA
HA
or FA (one input is zero)
HA + FA
or FA + FA
FA
HA
1
1 1
+1 1
Waste!!! Not recommend1 1 0
2-bits addition ( HA + FA )
x1
y1
x
S1
y
y
C
x2 x1
+ y2 y1
S3 S2 S1
x
x2
y2
Cn
S2
Cn+1
(S3)
Debug method
•
•
•
•
1.Check有無接VCC跟GND