summaryrefslogtreecommitdiff
path: root/226/CH3/EX3.27/example27_sce.sce
blob: 1a1e4f5b2d60d4082786a6f21d3020c2484519a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//chapter 3
//example 3.21
//page 119
printf("\n")
printf("given")
Vcc=5;Vf=.7;R1=3.3*10^3;
disp("A)")
Ir1=(Vcc-Vf)/R1;
printf("diode forward current when all input are low is %3.4fA\n",Ir1)
disp("for each diode")
If=Ir1/3
disp("B)")
If2=Ir1/2
If3=If2;
printf(" forward current when input A is high is %3.5fA\n",If3)
disp("C)")
If3=Ir1;
printf(" forward current when input A and B are high and C is low %3.5fA\n",If3)