from __future__ import division
ID=4*10**-3#
IDSS=2*ID#
RS=390#
VGSQ=-ID*RS#
VP=-4.5#
RD=2.2*10**3#
gm0=(2*IDSS)/(-VP)#
gm=gm0*(1-(VGSQ/VP))#
Av1=-gm*RD#
Av2=-gm*RD#
Av=Av1*Av2#
print "Av=%0.2f"%Av
vi=20*10**-3#
vo=Av*vi#
print 'vo=%0.2f mV'%(vo*10**3)
Zi=10*10**6#
RG=10*10**6#
print "Zi=RG=%0.2f Mohm"%(Zi*10**-6)
Z0=2.2*10**3#
RD=2.2*10**3#
print "Z0=RD=%0.2f"%(Z0*10**-3),'kohm'
RL=10*10**3#
VL=(RL/(Z0+RL))*vo#
print 'VL=%0.2f V'%(VL*10**3)
from __future__ import division
VCC=18#
R1=7.5*10**3#
R2=6.2*10**3#
R3=3.9*10**3#
RC=1.5*10**3#
B1=200#
B2=200#
RE=1*10**3#
CE=100*10**-6#
VB1=VCC*(R2+R3)/(R1+R2+R3)#
print 'VB1=%0.2f V'%VB1
VB2=VCC*(R3)/(R1+R2+R3)#
print 'VB2=%0.2f V'%VB2
IE2=(VB2-0.7)/RE#
IC2=IE2#
IE1=IC2#
IE=IE1#
re1=26*10**-3/IE#
AV1=-re1/re1#
AV2=-RC/re1#
AV=AV1*AV2#
print "AV=%0.2f"%AV ##ans given in book has -ve sign which is wrong
from __future__ import division
B1=160#
B2=160#
BD=B1*B2#
print "BD=%0.2f"%(BD)#
from __future__ import division
from math import sqrt
BD=6000#
B1=BD#
B2=B1#
B=sqrt(BD)#
print "B=%0.2f"%(B)#
from __future__ import division
Vcc=15#
RB=2.4*10**6#
BD=6000#
RE=510#
Vi=120*10**-3#
VBE=1.6#
IB=(Vcc-VBE)/(RB+BD*RE)#
print 'IB=%0.2f microA'%(IB*10**6)
IE=BD*IB#
print 'IE=%0.2f mA'%(IE*10**3)
IE2=IE
VE2=IE2*RE#
print 'VE2=%0.2f V'%VE2
from __future__ import division
hfe=100#
B=100#
BD=100**2#
RE=1*10**3#
hie=1*10**3#
ri=10**3#
Ri=ri+BD*RE#
print 'Ri=%0.2f Mohm'%(Ri*10**-6)
Ro=ri/BD#
print 'Ro=%0.2f ohm'%Ro
from __future__ import division
VCC=16#
B1=160#
B2=200#
RB=1.5*10**6#
Vi=120*10**-3#
VEB1=0.7#
RC=100#
IB1=(VCC-VEB1)/(RB+B1*B2*RC)#
IB2=B1*IB1#
IC2=B2*IB2#
IE1=IB2#
IC=IE1+IC2#
Vodc=VCC-IC*RC#
VBE=0.7#
Vidc=Vodc-VBE#
print 'Vidc=%0.2f V'%Vidc
from __future__ import division
VDD=18#
RD=2*10**3#
IDSS=6*10**-3#
VP=-3#
ID=IDSS#
print 'ID=%0.2f mA'%(ID*10**3)
Vo=VDD-ID*RD#
print 'Vo=%0.2f V'%Vo
from __future__ import division
VEE=-18#
R1=4.3*10**3#
R2=4.3*10**3#
RE=1.8*10**3#
B=100#
VB=-(-VEE*R2)/(R1+R2)#
VE=VB-0.7
IE=(VE-(VEE))/RE#
print 'IE=%0.2f mA'%(IE*10**3)
from __future__ import division
VZ=5.1#
VBE=0.7#
RE=1.2*10**3#
B=200#
I=(VZ-VBE)/RE#
print 'I=%0.2f mA'%(I*10**3)
from __future__ import division
VCC=18#
Rx=2*10**3#
VBE=0.7#
Ix=(VCC-VBE)/Rx#
I=Ix#
print 'I=%0.2f mA'%(I*10**3)
from __future__ import division
VC=5#
Re=2*10**3#
VCC=6#
R=2.2*10**3#
VBE=0.7#
B=100#
I=(VCC-2*VBE)/Re#
print 'I=%0.2f mA'%(I*10**3)
Re=1*10**3#
I=(VCC-2*VBE)/Re#
print 'I=%0.2f mA'%(I*10**3)
Re=4*10**3#
I=(VCC-2*VBE)/Re#
print 'I=%0.2f mA'%(I*10**3)
from __future__ import division
VCC=15#
VEE=15#
RE=3.9*10**3#
RC=4.7*10**3#
IE=(VEE-0.7)/RE#
print 'IE=%0.2f mA'%(IE*10**3)
IC=IE/2#
print 'IC=%0.2f mA'%(IC*10**3)
VC=VCC-IC*RC#
print 'VC=%0.2f V'%VC
from __future__ import division
VCC=12#
VEE=12#
RE=33*10**3#
RC1=36*10**3#
RC2=36*10**3#
B1=150#
B2=150#
vi1=2*10**-3#
IE=(VEE-0.7)/RE#
print 'IE=%0.2f mA'%(IE*10**3)
IC=IE/2#
print 'IC=%0.2f mA'%(IC*10**3)
RC=36*10**3#
VC=VCC-IC*RC#
print 'VC=%0.2f V'%VC
re1=25*10**-3/IE#
Av=RC/(2*re1)#
print "Av=%0.2f"%Av
vo1=Av*vi1#
print 'vo1=%0.2f V'%vo1
from __future__ import division
B=200#
ri=20*10**3#
RC=47*10**3#
RE=43*10**3#
Ac=(B*RE)/(ri+2*(B+1)*RE)#
print "Ac=%0.2f"%Ac