#Given
t=0.35 #rise time
#calculation
B=0.35/t #Bandwidth
#result
print"Bandwidth is",B,"MHz"
#Given
t=0.35 #rise time
#calculation
B=0.35/t #Bandwidth
gain=B
#result
print"Openloop Voltage gain is",gain
#Given
B1=10**6 #Hz
B2=100*10**3 #Hz
#calculation
gain=B1/B2
#Result
print"As frenquency goes down by a factor 10, Gain rise sby same which is",gain
#Given
B=1.5 #Mhz
f=1 #KHz
#Calculation
gain=B*1000/f
#Result
print"Open loop Voltage gain is",gain
#Find the actual gain
#Given
Acl=100.0 #Ideal Dc cloesd loop gain
Aol1=10000.0
Aol2=1000.0
Aol3=100.0
Aol4=10.0
Aol5=1.0
#Calculation (a)
#For a noninverting amplifier
a1=Acl #ideal gain, a=(Rf+Ri)/Ri
actualAcl1=a1/((1+1*a1/Aol1))
#For the inverting amplifier
a2=101 #gain
actualAcl1_=-a1/(1+1*a2/Aol1)
# (b)
#For a noninverting amplifier
a1=Acl #ideal gain, a=(Rf+Ri)/Ri
actualAcl2=a1/(1+1*a1/Aol2)
#For the inverting amplifier
a2=101 #gain
actualAcl2_=-a1/(1+1*a2/Aol2)
#(c)
#For a noninverting amplifier
a1=Acl #ideal gain, a=(Rf+Ri)/Ri
actualAcl3=a1/(1+1*a1/Aol3)
#For the inverting amplifier
a2=101 #gain
actualAcl3_=-a1/(1+1*a2/Aol3)
#(d)
#For a noninverting amplifier
a1=Acl #ideal gain, a=(Rf+Ri)/Ri
actualAcl4=a1/(1+1*a1/Aol4)
#For the inverting amplifier
a2=101 #gain
actualAcl4_=-a1/(1+1*a2/Aol4)
#(e)
#For a noninverting amplifier
a1=Acl #ideal gain, a=(Rf+Ri)/Ri
actualAcl5=a1/(1+1*a1/Aol5)
#For the inverting amplifier
a2=101 #gain
actualAcl5_=-a1/(1+1*a2/Aol5)
#Result
print"(a)Actual gain in noninverting amplifier is",round(actualAcl5,2)
print"Actual gain in inverting amplifier is",round(actualAcl5_,2)
print"(b)Actual gain in noninverting amplifier is",round(actualAcl4,2)
print"Actual gain in inverting amplifier is",round(actualAcl4_,2)
print"(c)Actual gain in noninverting amplifier is",round(actualAcl3,2)
print"Actual gain in inverting amplifier is",round(actualAcl3_,2)
print"(d)Actual gain in noninverting amplifier is",round(actualAcl2,2)
print"Actual gain in inverting amplifier is",round(actualAcl2_,2)
print"(e)Actual gain in noninverting amplifier is",round(actualAcl1,0)
print"Actual gain in inverting amplifier is",round(actualAcl1_,2)
#Given
Ri=10.0 #Kohm
Rf=Ri
B=10**6 #Hz
#Calculation
#(a)
Acl1=-Rf/Ri
fh1=B/((Ri+Rf)/Ri)
#(b)
ACl2=(Ri+Rf)/Ri
#(c)
Acl3=1 #Voltage follower gain
Rf2=0
Ri2=1
fh2=B/((Ri2+Rf2)/Ri2)
#Resilt
print"(a)The voltage gain is",Acl1
print"bandwidth is",fh1/1000,"khz"
print"(b)The voltage gain is",ACl2
print"(c)The voltage gain is",Acl3
print"bandwidth is",fh2/1000000,"Mhz"
#Given
V=10 #V
slewrate=0.5 #per microsecond
#Calculation
t=V/slewrate
#Result
print"The time taken is",t,"microsecond"
#Given
slewrate=0.5 #per microsecond
V1=10.0 #Peak voltage
V2=1
#Calculation
fmax1=slewrate*1000/(6.28*V1)
fmax2=slewrate*1000/(6.28*V2)
#Result
print"(a)maximum frenquency is",round(fmax1,1),"KHz"
print"(b)maximum frenquency is",round(fmax2,0),"KHz"
#Given
B1=500 #Khz, bandwidth
gain1=-1 #Gain for inverting amplifier
gain2=2 #Gain for non-inverting amplifier
slewrate=0.5 #per micros
V=10 #V
#Calculation
Vopmax=slewrate*10**6/(6.28*B1*10**3)
fmax=slewrate*1000/(6.28*V)
#Result
print"Maximum operating voltage is",round(Vopmax*1000,1),"mV"
print"maximum frenquency is",round(fmax,0),"Khz"