import math
#initialisation of variables
Rc=12.0*10**3
Vcc=20.0
print(" When Ic=0")
Ic=0
#Calculations
Vce=Vcc-Ic*Rc
print(" At point A Ic=0 nad Vce=20")
print("When Vce=0")
Vce=0
Ic=Vcc/Rc
#Results
print(" At point B Ic=1.7mA and Vce=0")
print("Ic is %.1f mA " %(Ic*10**3))
import math
#initialisation of variables
Vcc=18.0
Rc=2.2*10**3
Ib=40.0*10**-6
#Calculations
print("when Ic=0")
Ic=0
Vce=Vcc-Ic*Rc
print("At point A Ic=0 and Vce=18")
print("when Vce=0")
Ic=Vcc/Rc
#Results
print(" at point B Ic=8.2mA and Vce=0")
print("Ic = %.1f mA " %(Ic*10**3))
import math
#initialisation of variables
Rb=470*10**3
Rc=2.2*10**3
Vcc=18.0
hfe=100
Vee=.7
#Calculations
Ib=(Vcc-Vee)/Rb
Ic=hfe*Ib
Vce=Vcc-Ic*Rc
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
hFEmin=50.0
hFEmax=200.0
Vcc=18.0
Vbe=0.7
Rb=470.0*10**3
#Calculations
Ib=(Vcc-Vbe)/Rb
Ic=hFEmin*Ib
Vce=Vcc-Ic*Rc
Ic=hFEmax*Ib
Vce=Vcc-Ic*Rc
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
Rb=270*10**3
Rc=2.2*10**3
Vcc=18.0
hFE=100
Vbe=.7
#Calculations
Ib=(Vcc-Vbe)/(Rb+Rc*(hFE+1))
Ic=hFE*Ib
Vce=Vcc-Rc*(Ic+Ib)
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
R1=33.0*10**3
R2=12.0*10**3
Rc=1.2*10**3
Re=1*10**3
Vcc=18.0
Vbe=.7
#Calculations
Vb=(Vcc*R2)/(R1+R2)
Ve=Vb-Vbe
Ie=(Vb-Vbe)/Re
Ic=Ie
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
Vcc=18.0
Vbe=.7
hfe=100.0
R1=33*10**3
R2=12.0*10**3
Re=1.0*10**3
#Calculations
Vt=(Vcc*R2)/(R1+R2)
Rt=(R1*R2)/(R1+R2)
Ib=(Vt-Vbe)/(Rt+Re*(1+hfe))
Ic=hfe*Ib
Ie=Ib+Ic
Ve=Ie*Re
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
hfe=50.0
Vt=4.8
Rt=8.8*10**3#from example 5.7
Re=1.0*10**3
Vbe=.7
#Calculations
Ib=(Vt-Vbe)/(Rt+Re*(1+hfe))
Ic=hfe*Ib
Ie=Ib+Ic
Ve=Ie*Re
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
Vt=4.8
Rt=8.8*10**3#from example 5.8
Re=1*10**3
Vbe=.7
hfe=200.0
#Calculations
Ib=(Vt-Vbe)/(Rt+Re*(1+hfe))
Ic=hfe*Ib
Ie=Ib+Ic
Ve=Ie*Re
Vc=Vcc-(Ic*Rc)
Vce=Vc-Ve
#Results
print("Current voltage is %.1f V " %(Vce))
import math
#initialisation of variables
Vce=5.0
Ic=5*10**-3
Vcc=15.0
hfe=100.0
#Calculations
Rc=(Vcc-Vce)/Ic
Ib=Ic/hfe
Rb=(Vcc-Vbe)/Ib
#Results
print("The value of Rv is %.1f kohm " %(Rb/1000))
import math
#initialisation of variables
Vce=5.0
Ic=5*10**-3
Vcc=15.0
hfe=100.0
#Calculations
Ib=Ic/hfe
Rc=(Vcc-Vce)/(Ic+Ib)
Rb=(Vce-Vbe)/Ib
#Results
print("The value of Rb is %.1f kohm " %(Rb/1000))
import math
#initialisation of variables
Vce=5.0
Ve=Vce
Ic=5.0*10**-3
hFE=100.0
Vcc=15.0
Vbe=0.7
#Calculations
Ie=Ic
Re=Ve/Ie
Rc=(Vcc-Vce-Ve)/Ic
I2=Ic/10
Vb=Ve+Vbe
R2=Vb/I2
R1=(Vcc-Vb)/I2
#Results
print("The value of Rb is %.1f kOhm " %(R1/1000))
import math
#initialisation of variables
Vce=3.0
Ve=5.0
Ic=1*10**-3
Vcc=12.0
#Calculations
Ie=Ic
R4=Ve/Ie
print(" with Ic=1mA and R4=4.7Kohm")
R4=4.7*10**3
Ve=Ic*R4
Vc=Ve+Vce
Vr3=Vcc-Vc
R3=Vr3/Ic
Vb=Ve+Vbe
I2=Ic/10
R2=Vb/I2
print(" with R2=56Kohm and Vb=5.4V")
R2=56*10**3
I2=Vb/R2
R1=(Vcc-Vb)/I2
#Results
print("The value of R1 is %.1f V " %(R1/1000))
import math
#initialisation of variables
Vce=9.0
Ve=4.0
Ic=4*10**-3
Vcc=18.0
#Calculations
Ie=Ic
R4=Ve/Ie
Vb=Ve+Vbe
I2=Ic/10
R2=Vb/I2
print(" with R2=12Kohm standard")
R2=12*10**3
I2=Vb/R2
R1=(Vce+Ve-Vb)/I2
print(" with R1=22kohm standard")
R1=22*10**3
Vr3=Vcc-Vce-Ve
R3=Vr3/(Ic+I2)
#Results
print("The value of R3 %.2f V " %(R3/1000))
import math
#initialisation of variables
Vc=5.0
Ic=1.0*10**-3
hFE=70.0
Vbe=.7
Vee=9.0
Vcc=Vee
Re=8.2*10**3
#Calculations
Ve=Vee-Vbe
Ie=Ic
R3=Ve/Ie
print(" with R3=8.2kohm standard value")
R3=8.2*10**3
Ie=Ve/R3
Vr2=Vcc-Vc
R2=Vr2/Ic
Ib=Ic/hFE
Vr1=Vbe/10
R1=Vr1/Ib
print(" use 4.7Kohm as standard")
#the transistor emitter terminal is .7 below ground and voltage across Re is
Ve=Vee-Vbe
Ie=Ve/Re
Vc=Vcc-(Ie*3.9*10**3)
#Results
print("Current voltage is %.1f V " %(Vc))
import math
#initialisation of variables
hFE=100.0
Rc=2.2*10**3
Rb=270.0*10**3
Re=1.0*10**3
R1=33.0*10**3
R2=12*10**3
#Calculations
S=1+hFE
print("for collector to base bias")
S=(1+hFE)/(1+(hFE*Rc)/(Rc+Rb))
print(" for voltage divider bias")
print("S=(1+hFE)/(1+hFE*Re(Re+R1||R2))")
S=(1+hFE)/(1+(hFE*Re)/(Re+(R1*R2)/(R1+R2)))
#Results
print("Voltage-divider bias is %.2f " %(S))
import math
#initialisation of variables
Icbo1=15.0*10**-9# at 25C
S=101.0
print("chnage in temp")
T=105-25
print(" n=T in 10 step")
n=T/10.0
#Calculations
Icbo2=Icbo1*2**n
Icbo=Icbo2-Icbo1
print(" for base bais")
Ic=S*Icbo
print(" for collector to base bais")
S=56
Ic=S*Icbo
print(" for voltage divider bais")
S=8.2
Ic=S*Icbo
#Results
print("The value of Ic is %.1f mA " %(Ic*10**6))
import math
#initialisation of variables
Re=4.7*10**3
T=125-25
#Calculations
Vbe=T*(1.8*10**-3)
Ie=Vbe/Re
#Results
print("The value of Ie is %.1f V " %(Ie*10**6))
import math
#initialisation of variables
Vcc=10.0
Rc=1.0*10**3
Rb=6.8*10**3
Vs=5.0
#Calculations
print(" hFE calculation")
Ic=Vcc/Rc
Ib=(Vs-Vbe)/Rb
hFE=Ic/Ib
print("when hFE=10")
hFE=10
Ic=hFE*Ib
Vce=Vcc-(Ic*Rc)
#Results
print("Current voltage is %.1f V " %(Vce))
#initialisation of variables
Vcc=15.0
Rc=3.3*10**3
Vbe=.7
Rb=56.0*10**3
#Calculations
Ic=Vcc/Rc
Ib=(Vcc-Vbe)/Rb
hFE=Ic/Ib
#Results
print(" minimum hFE is %3.2f " %hFE)
#initialisation of variables
Vcc=12.0
Ic=1.5*10**-3
Vs=5.0
hFE=10.0
Vbe=.7
#Calculations
Rc=Vcc/Ic
Ib=Ic/hFE
Rb=(Vs-Vbe)/Ib
#Results
print("The value of Rb is %.1f kohm " %(Rb/1000))
#Calculations
Vcc=9.0
Ic=2*10**-3
hFE=10.0
Vbe=.7
#Calculations
Rc=Vcc/Ic
Ib=Ic/hFE
Rb=(Vcc-Vbe)/Ib
#Results
print("The value of Rb is %.2f kohm " %(Rb/1000))