#Given data
I_b1 = 18 # in µA
I_b2 = 22 # in µA
I_b = (I_b1+I_b2)/2 # in µA
print "Input bias current %0.f µA" %I_b
I_ios = abs(I_b1-I_b2) # in µA
print "Input offset current = %0.f µA" %I_ios
from numpy import pi
#Given data
I_CQ = 10 # in µA
I_CQ= I_CQ*10**-6 # in A
I = I_CQ # in A
C_C = 33 # in pF
C_C=C_C*10**-12 # in F
C = C_C # in F
S = I/C # in V/sec
print "The slew rate = %0.3f V/µ-sec" %(S*10**-6)
V_m = 12 # in V
f_m = S/(2*pi*V_m) # in Hz
f_m = f_m * 10**-3 # in kHz
print "Maximum possible frequency = %0.3f kHz" %f_m
#Given data
CMRR = 100
V1 = 300 # in µV
V2 = 240 # in µV
V_id = V1-V2 # in µV
V_cm = (V1+V2)/2 # in µV
A_id = 5000
A_cm = A_id/CMRR
V_out = (A_id*V_id) + (A_cm*V_cm) # in µV
V_out = V_out * 10**-3 # in mV
print "Part (i)"
print "The output Voltage = %0.1f mV" %V_out
print "\nPart (ii)"
CMRR = 10**5
A_cm = A_id/CMRR
V_out = (A_id*V_id) + (A_cm*V_cm) # in µV
V_out = V_out* 10**-3 # in mV
print "The output voltage = %0.f mV" %V_out
from __future__ import division
from math import log10
#Given data
R1 = 1 # in k ohm
R2 = 100 # in k ohm
A_id = R2/R1 # in k ohm
Epsilon = 1 - (90/R2)
A_cm = (R2*Epsilon)/(R1+R2)
CMMR = A_id/A_cm
CMRR = 20*log10(CMMR) # in dB
print "The value of CMRR = %0.f dB" %CMRR
#Given data
gm1= 1/5.26 # in mA/V
gm1= gm1*10**-3 # in A/v
I= 9.5 # in µA
I=I*10**-6 # in A
del_I= 5.5*10**-3*I # in A
V_OS= del_I/gm1 # in V
print "The offset voltage = %0.1f mV" %(V_OS*10**3)
#Given data
V = 10 # in V
R1 = 1 # in k ohm
R1=R1*10**3 # in ohm
R2 = 9 # in k ohm
R2= R2*10**3 # in ohm
I_out = 20 # in mA
I_out=I_out*10**-3 # in A
R_L = V/( I_out-(V/(R1+R2)) ) # in ohm
print "The lowest value of R_L = %0.f ohm" %R_L
#Given data
I_CQ = 10 # in µA
I_CQ= I_CQ*10**-6 # in A
I = I_CQ # in A
C_C = 33 # in pF
C_C=C_C*10**-12 # in F
C = C_C # in F
S = I/C # in V/sec
print "The slew rate = %0.3f V/µ-sec" %(S*10**-6 )
V_m = 12 # in V
f_m = S/(2*pi*V_m) # in Hz
f_m = f_m * 10**-3 # in kHz
print "Maximum possible frequency = %0.3f kHz" %f_m