Rf=100.0 #feedback path resistance Rf (KOhm)
R1=100.0 #inverting input resistance R1(KOhm)
R2=1.0 #inverting input & drain resistance R2(KOhm)
Av1=(Rf/(R1**-1+R2**-1)**-1)+1 #maximum voltage gain
Av2=(Rf/R1)+1 #minimum voltage gain
print 'maximum voltage gain = ',Av1
print 'minimum voltage gain = ',Av2
R1=1.2 #inverting input resistance R1(KOhm)
R2=91.0 #feedback resistance R2(KOhm)
Av1=-R2/R1 #maximum voltage gain
Av2=0 #minimum voltage gain
print 'maximum voltage gain = ',round(Av1,2)
print 'minimum voltage gain = ',Av2
R=1.5 #inverting input resistance R1(KOhm)
nR=7.5 #feedback resistance(KOhm)
n=nR/R #max. limit of voltage gain
rf=nR/(n-1) #fixed resistor (KOhm)
print 'maximum positive voltage gain = ',n
print 'other fixed resistor = ',rf,'KOhm'
R1=1.0 #inverting input resistance R1(KOhm)
R2=100.0 #feedback resistance R2(KOhm)
R=10.0 #resistor of opamp in seconnd stage(KOhm)
Vin=10*10**-3 #input voltage(V)
Vin_CM=10 #common mode input voltage(V)
T=0.0001 #tolerance of resistor
Av=(R2/R1)+1 #preamp voltage gain
Av_CM=2*T #common mode voltage gain of 2nd stage
Vout=-Av*Vin #output siganl voltage(V)
Vout_CM=Av_CM*Vin_CM #output siganl voltage for common mode signal(V)
print 'output siganl voltage for common mode signal Vout(CM) = ',Vout_CM,'V'
print 'output siganl voltage Vout = ',Vout,'V'
Rf=6.0 #feedback path resistance Rf (KOhm)
R1=1.0 #inverting input resistance R1(KOhm)
R2=2.0 #inverting input resistance R2(KOhm)
R3=3.0 #non-inverting input resistance R3(KOhm)
R4=4.0 #non-inverting input resistance R4(KOhm)
R5=5.0 #non-inverting input resistance R5(KOhm)
Av1=(-Rf/R1) #voltage gain1
Av2=(-Rf/R2) #voltage gain2
Av3=(1+(Rf/((R1**-1+R2**-1)**-1)))*(((R4**-1+R5**-1)**-1)/(R3+((R4**-1+R5**-1)**-1))) #voltage gain3
Av4=(1+(Rf/((R1**-1+R2**-1)**-1)))*(((R3**-1+R5**-1)**-1)/(R4+((R3**-1+R5**-1)**-1))) #voltage gain4
print 'Voltage gain channel-1 Av1 = ',Av1
print 'Voltage gain channel-2 Av2 = ',Av2
print 'Voltage gain channel-3 Av3 = ',round(Av3,2)
print 'Voltage gain channel-4 Av4 = ',round(Av4,2)
D0=1 #digital input0 (binary)
D1=0 #digital input1 (binary)
D2=0 #digital input2 (binary)
D3=1 #digital input3 (binary)
Vref=5 #reference voltage(V)
N=4 #no. of inputs
BIN=(D0*2**0)+(D1*2**1)+(D2*2**2)+(D3*2**3) #decimal equivalent BIN
Vout=-((2*Vref*BIN)/2.0**N) #output voltage of converter(V)
print 'decimal equivalent BIN = ',BIN
print 'output voltage of converter Vout = ',Vout,'V'
R2=51 #feedback path resistance (KOhm)
R1=1 #inverting input resistance R1(KOhm)
Bdc=125 #current gain
Zout=75 #open loop output impedance(Ohm)
AVOL=100000 #741C voltage gain
Av=-R2/R1 #closed loop voltage gain
B=R1/(R1+R2) #feedback fraction
Zout_CL=Zout/(1+(AVOL*B)) #closed loop output impedance(Ohm)
Isc=25.0/1000 #shorted current for 741C op-amp(A)
Imax=Bdc*Isc #maximum load current(A)
print 'closed loop output impedance Zout(CL) = ',Zout_CL,'Ohm'
print 'maximum load current Imax = ',Imax,'A'
Vin=1.0 #input voltage(V)
VCC=15 #supply voltage(V)
R=10 #inverting input resistance(KOhm)
Vin2=10.0 #larger input(V)
iout=Vin/R #output current(mA)
RL_max=R*(VCC/Vin2-1) #Maximum load resistance(KOhm)
print 'Output current iout = ',iout,'mA'
print 'Maximum load resistance RL(max) = ',RL_max,'KOhm'
Vin=3.0 #input voltage(V)
VCC=15 #supply voltage(V)
R=15 #inverting input resistance(KOhm)
Vin2=12.0 #larger input(V)
iout=-Vin/R #output current(mA)
RL_max=(R/2.0)*(VCC/Vin2-1) #Maximum load resistance(KOhm)
print 'Output current iout = ',iout,'mA'
print 'Maximum load resistance RL(max) = ',RL_max,'KOhm'
R2=47 #feedback path resistance (KOhm)
R1=1.0 #inverting input resistance R1(KOhm)
R3=100 #non-inverting input resistance R3(KOhm)
rds1=0.050 #ohmic resistance of JFET (KOhm)
rds2=120.0 #ohmic resistance of JFET (KOhm)
Av1=((R2/R1)+1)*(rds1/(rds1+R3)) #minimum voltage gain
Av2=((R2/R1)+1)*(rds2/(rds2+R3)) #maximum voltage gain
print 'Maximum voltage gain Av = ',round(Av2,2)
print 'Minimum voltage gain Av = ',round(Av1,3)