#Caption:Determine the capacitance for flip flop design and triggering frequency
#Ex13.4
R1=16.1#Resistor(in kilo ohm)
R2=27#Resistor(in kilo ohm)
t=260#time(in ns)
R=R1*R2/(R1+R2)
C=t/(0.1*R)
f=10**6/(2.3*C*R)
print '%s %.f %s %.f' %("Capacitance(in pF)=",C,"\nFrequency(in Khz)=",f)
#Caption:Design a collector coupled bistable multivibrator
#Ex13.1
V=5.#Supply voltage(in volts)
Ic=2.#Saturated collector current(in mA)
Vce=0.2#Collector emitter voltage(in volts)
hfe=70.
Vbe=0.7#Base emitter voltage(in volts)
Vbb=-5.#Base voltage(in volts)
Rc=(V-Vce)/Ic
Ib=Ic/hfe
Vb1=Vbe-Vbb
I2=Ic/10.
R2=Vb1/I2
I2=Vb1/R2
R=(V-Vbe)/(I2+Ib)
R1=R-Rc
print '%s %.1f %.1f %.1f' %('Components required to design the circuit are resistors(in kilo ohm)=',Rc,R1,R2)
#R1 value is corrected