import math
#given
Vcc=5; #in V
Vf=1.5; #in V
If=60; #in mA
B=3.97;
N=3;
R9=(Vcc-Vf)*(B+1)/If/10**-3;
print"R9 =",round(R9,4),"ohm";
R7=R9/2/B-3/N;
print"R7 =",round(R7,4),"ohm";
R8=R9/2/B;
print"R8 =",round(R8,4),"ohm";
C4=2*10**-9/R8;
print"C4 =",round(C4*10**12,4),"pF";
import math
#given
Vu3=1.24; #in V
Vbeq3=0.7; #in V
Vbeq4=0.7; #in V
R5=17.5; #in Ohm
R6=17.5; #in Ohm
Voh=5; #in V
Vol=0; #in V
If=(Vu3-Vbeq3)/R5+(Vu3-Vbeq4)/R6;
print"If=",round(If*1000,4),"mA";
R3=(Voh-Vol)/If;
print"R3=",round(R3,4),"ohm";
C4=2*10**-9/R3;
print"C4=",round(C4*10**12,4),"pF";
##"Page number 581 again Example 13-2 (numbering mistake)";
import math
#given
Er=4.9;
h=5; #in mils
w=10; #in mils
t=0.5; #in mils
Z=60.0/math.sqrt(0.475*Er+0.67)*log(4*h/0.67/(0.8*w+t));
print"Z =",round(Z,4),"ohm";
tpd=1.017*sqrt(0.475*Er+0.67);
print"tpd =",round(tpd,4),"ns/ft";
Tpd=tpd*1000/12; #converted into ps/in
print"tpd =",round(Tpd,4),"ps/in";
Co=Tpd/Z;
print"Co =",round(Co,4),"pF/in";
import math
#given
Er=4.7;
b=10; #in mils
w=4; #in mils
t=0.5; #in mils
Z=60/math.sqrt(Er)*log(4*b/0.67/math.pi/(0.8*w+t));
print" Z =",round(Z,4),"ohm";
tpd=1.017*sqrt(Er);
print" tpd =",round(tpd,4),"ns/ft";
Tpd=tpd*1000/12; #converted into ps/in
print" Also,tpd =",round(Tpd,4),"ps/in";