# Chapter 1- Differential Amplifiers¶

## Example 1.1 - Page 11¶

In :
# Given data
VCC= 9;#in V
VEE= -9;# in V
RC= 3.9;#in kΩ
RE= 3.3;# in kΩ
VBE= 0.7;# in V
IE= (abs(VEE)-VBE)/(2*RE);# emitter current in mA
IC= IE;# collector current in mA
# Collector voltage,
VC= VCC-IC*RC;# in V
print "The collector voltage = %0.3f volts" %VC
# Emitter voltage,
VE= 0-VBE;# in V
print "The emitter voltage = %0.1f volts" %VE
# Collecctor-emitter voltage,
VCE= VC-VE;# in V
print "The collector-emitter voltage = %0.3f volts" %VCE

# Note : There is some difference between coding output and the answer of the book
#        because in the book the value of IE is used as 1.25mA while the calculated value of IE is 1.258

The collector voltage = 4.095 volts
The emitter voltage = -0.7 volts
The collector-emitter voltage = 4.795 volts


## Example 1.2 - Page 12¶

In :
# Given data
VCC= 10;#in V
VEE= -10;# in V
RC= 10;#in kΩ
RE= 9.3;# in kΩ
VBE= 0.7;# in V
IE= (abs(VEE)-VBE)/(2*RE);# emitter current in mA
ICQ= IE;#quiescent collector current in mA
print "The quiescent collector current = %0.1f mA" %ICQ
# Quiescent Collector-emitter voltage,
VCEQ= VCC+VBE-ICQ*RC;# in V
print "The quiescent collector-emitter voltage = %0.1f volts" %VCEQ

The quiescent collector current = 0.5 mA
The quiescent collector-emitter voltage = 5.7 volts


## Example 1.3 - Page 12¶

In :
from __future__ import division
# Given data
VCC= 12;#in V
VEE= -12;# in V
RC= 10;#in kΩ
RE= 10;# in kΩ
RB= 20;# in kΩ
VBE= 0.7;# in V
# Part (a)
beta_dc= 75;
# Tail current, IT= 2*IE= VEE/RE (ignoring VBE), hence
IT= abs(VEE)/RE;# in mA
IC= IT/2;#collector current in mA
# output voltage,
Vout1= VCC-(IC*RC);# in V
IT= (abs(VEE)-VBE)/RE;# tail current in mA (on considering VBE)
IC= IT/2;#collector current in mA
Vout2= VCC-IC*RC;# in V
# Tail current,
IT= (abs(VEE)-VBE)/(RE+RB/(2*beta_dc));# in mA
IC= IT/2;#collector current in mA
# output voltage,
Vout3= VCC-IC*RC;# in V
print "Part (a) : There are three different  values of output voltage "
print "%0.f V" %Vout1
print "%0.2f V" %Vout2
print "%0.3f V" %Vout3

# Part (b)
IT= abs(VEE)/RE;# in mA
IC= IT/2;#collector current in mA
IB= IC/(beta_dc);# base current in mA
IB= IB*10**3;# in µA
VB= -IB*RB;#base voltage  in mV
VB= VB*10**-3;# in V
print "\nPart (b) : "
print "The value of base current = %0.f µA" %IB
print "The value of base voltage = %0.2f V" %VB

# Part (c)
beta_dc1= 60;
beta_dc2= 80;
IB1= IC/beta_dc1;#base current for transistor Q1, in mA
IB1= IB1*10**3;# in µA
print "\nPart (c)"
print "The value of base current for transistor Q1 = %0.f µA " %IB1
VB1= -IB1*RB;# in mV
VB1= VB1*10**-3;# in V
print "The value of base voltage for transistor Q1 = %0.1f V" %VB1
IB2= IC/beta_dc2;#base current for transistor Q2, in mA
IB2= IB2*10**3;# in µA
print "The value of base current for transistor Q2 = %0.1f µA" %IB2
VB2= -IB2*RB;# in mV
VB2= VB2*10**-3;# in V
print "The value of base voltage for transistor Q2 = %0.2f V" %VB2

# Note : In the part (c), the unit of base current for transistor Q2 in the book is wrong it will be µA

Part (a) : There are three different  values of output voltage
6 V
6.35 V
6.424 V

Part (b) :
The value of base current = 8 µA
The value of base voltage = -0.16 V

Part (c)
The value of base current for transistor Q1 = 10 µA
The value of base voltage for transistor Q1 = -0.2 V
The value of base current for transistor Q2 = 7.5 µA
The value of base voltage for transistor Q2 = -0.15 V


## Example 1.4 - Page 13¶

In :
# Given data
RC= 2.2;#in kΩ
RE= 4.7;# in kΩ
RE= RE*10**3;# in Ω
Ri1= 50;# in Ω
Ri2= 50;# in Ω
VCC= 10;#in V
VEE= 10;# in V
VBE= 0.7;# in V
beta_dc= 100;
beta_ac= 100;

# Part (a)
# Formula Used : ICQ= IE= (VEE-VBE)/(2*RE+Ri/beta_dc)
ICQ= (VEE-VBE)/(2*RE+Ri1/beta_dc);#quiescent collector current in A
ICQ= ICQ*10**3;# in mA
IE= ICQ;# in mA
print "Part (a)"
print "The value of ICQ = %0.4f mA" %ICQ
# Quiescent collector-emitter voltage,
VCEQ= VCC+VBE-ICQ*RC;# in V
print "The value of VCEQ = %0.4f V" %VCEQ

# Part (b)
re_desh= 26/IE;# AC emitter resistance in Ω
# Formula Used : Ad= Vout/Vind= RC/re_desh
Ad= RC*10**3/re_desh;# voltage gain
print "Part (b)"
print "The voltage gain = %0.2f " %Ad

# Part (c)
Rin1= 2*beta_ac*re_desh;# input resistance in Ω
Rin1= Rin1*10**-3;#in kΩ
Rin2= Rin1;# in kΩ
print "Part (c)"
print "The input resistance = %0.3f kΩ" %Rin1

# Part (d)
Rout1= RC;# in kΩ
print "Part (d)"
print "The output resistance = %0.1f kΩ" %Rout1

Part (a)
The value of ICQ = 0.9893 mA
The value of VCEQ = 8.5235 V
Part (b)
The voltage gain = 83.71
Part (c)
The input resistance = 5.256 kΩ
Part (d)
The output resistance = 2.2 kΩ


## Example 1.5 - Page 14¶

In :
# Given data
VCC= 15;#in V
VEE= 15;# in V
RC= 1;#in MΩ
RE= RC;# in MΩ
beta_ac= 100;
VBE= 0.7;# in V
IE= (VEE-VBE)/(2*RE);#emitter current in µA
IC= IE;# in collector current in µA
re_desh= 26/IE;# ac resistance of each emitter diode in kΩ
Ad= RC*10**3/re_desh;# Voltage gain
print "The voltage gain = %0.f" %Ad
Zin= 2*beta_ac*re_desh;# input impedance in kΩ
Zin= Zin*10**-3;# in MΩ
print "The input impedance = %0.4f MΩ" %Zin
Zout= RC;#output impedance in MΩ
print "The output impedance = %0.f MΩ" %Zout
Acm= (RC*10**3)/(2*RE*10**3+re_desh);# common-mode gain
CMRR= Ad/Acm;# common-mode rejection ratio
print "The common-mode rejection ratio = %0.f " %CMRR
# When v_in is zero
Vout= VCC- IC*RC;# in V
print "When v_in is zero then the total output voltage at the quiescent value = %0.2f V" %Vout
# When v_in= 1mV,
v_in= 1*10**-3;# in V
Vout= Ad*v_in;# in V
print "When v_in is -1mV then the ac output voltage = %0.3f V" %Vout

# Note : The value of CMRR in the book is wrong because the correct value of Acm is "0.4991" and
#       in the book it is taken as "0.4225"

The voltage gain = 275
The input impedance = 0.7273 MΩ
The output impedance = 1 MΩ
The common-mode rejection ratio = 551
When v_in is zero then the total output voltage at the quiescent value = 7.85 V
When v_in is -1mV then the ac output voltage = 0.275 V


## Example 1.6 - Page 16¶

In :
# Given data
VEE= 5;# supply voltage in V
RC= 2*10**3;# collector resistance in Ω
RE= 4.3;# emitter resistance in kΩ
VBE= 0.7;# in V
VT= 26;# in mV
IE= (VEE-VBE)/(2*RE);#emitter current in mA
re_desh= VT/IE;#dynamic emitter resistance in Ω
Ad= RC/(2*re_desh);# differential mode gain
print "The differential mode gain = %0.2f" %Ad

The differential mode gain = 19.23


## Example 1.7 - Page 17¶

In :
# Given data
VEE= 5;# supply voltage in V
RC= 2*10**3;# collector resistance in Ω
RE= 4.3;# emitter resistance in kΩ
VBE= 0.7;# in V
VT= 26;# in mV
IE= (VEE-VBE)/(2*RE);#emitter current in mA
re_desh= VT/IE;#dynamic emitter resistance in Ω
Ad= RC/(2*re_desh);# differential mode gain
Acm= RC/(2*RE*10**3+re_desh);# common mode gain
print "The common mode gain = %0.4f" %Acm
CMRR= Ad/Acm;# common mode rejection ratio
print "The CMRR = %0.1f" %CMRR

The common mode gain = 0.2312
The CMRR = 83.2


## Example 1.8 - Page 19¶

In :
# Given data
VEE= 9;#in V
VCC= 9;#in V
RC= 47*10**3;# collector resistance in Ω
RE= 43*10**3;# emitter resistance in Ω
vin1= 2.5*10**-3;# in V
Ri1= 20*10**3;# in Ω
Ri2= Ri1;# in Ω
VBE= 0.7;# in V
VT= 26*10**-3;# in V
beta1= 75;
beta2= 75;
IE= (VEE-VBE)/(2*RE+Ri1/beta1);#emitter current in A
ICQ= IE;# quiescent current in A
VCEQ= VCC+VBE-ICQ*RC;# quiescent collector voltage in V
re_desh= VT/IE;#AC emitter resistance in Ω
Ad= RC/re_desh;# voltage gain
vout= Ad*vin1;# output voltage in V
print "The output voltage = %0.3f V" %vout

The output voltage = 0.435 V


## Example 1.9 - Page 20¶

In :
# Given data
RC= 2.2;#in kΩ
RE= 4.7;# in kΩ
Ri1= 50*10**-3;# in kΩ
Ri2= 50*10**-3;# in kΩ
VCC= 10;#in V
VEE= 10;# in V
VBE= 0.7;# in V
beta_dc= 100;
beta_ac= 100;

# Part (i)
# Formula Used : ICQ= IE= (VEE-VBE)/(2*RE+Ri/beta_dc)
ICQ= (VEE-VBE)/(2*RE+Ri1/beta_dc);#quiescent collector current in mA
IE= ICQ;# in mA
print "Part (i) : Dual-input, unbalanced output"
print "The value of ICQ = %0.4f mA" %ICQ
# Quiescent collector-emitter voltage,
VCEQ= VCC+VBE-ICQ*RC;# in V
print "The value of VCEQ = %0.4f V" %VCEQ
re_desh= 26/IE;# AC emitter resistance in Ω
Rin1= 2*beta_ac*re_desh;# input resistance in Ω
Rin1= Rin1*10**-3;#in kΩ
Rin2= Rin1;# in kΩ
print "The value of Rin1 = %0.3f kΩ " %Rin1
print "The value of Rin2 = %0.3f kΩ " %Rin1
Rout= RC;# in kΩ
print "The value of Rout = %0.1f kΩ" %Rout
print "The value of RC = %0.1f kΩ" %RC
# Formula Used : Ad= Vout/Vind= RC/re_desh
Ad= RC*10**3/(re_desh*2);# voltage gain of dual input, unbalanced output
print "The value of Ad = %0.3f " %Ad

# Part (ii)
print "\nPart (ii) : Single-output, balanced output"
print "The value of ICQ = %0.4f mA" %ICQ
print "The value of VCEQ = %0.4f V" %VCEQ
print "The value of Rin = %0.3f kΩ" %Rin1
print "The value of Rout1 = %0.1f kΩ" %Rout
print "The value of Rout2 = %0.1f kΩ" %Rout
# Formula Used : Ad= Vout/Vind= RC/re_desh
Ad= RC*10**3/(re_desh);# voltage gain of dual input, unbalanced output
print "The value of Ad = %0.2f" %Ad

Part (i) : Dual-input, unbalanced output
The value of ICQ = 0.9893 mA
The value of VCEQ = 8.5235 V
The value of Rin1 = 5.256 kΩ
The value of Rin2 = 5.256 kΩ
The value of Rout = 2.2 kΩ
The value of RC = 2.2 kΩ
The value of Ad = 41.855

Part (ii) : Single-output, balanced output
The value of ICQ = 0.9893 mA
The value of VCEQ = 8.5235 V
The value of Rin = 5.256 kΩ
The value of Rout1 = 2.2 kΩ
The value of Rout2 = 2.2 kΩ
The value of Ad = 83.71


## Example 1.10 - Page 22¶

In :
# Given data
VEE= 9;#in V
VCC= 9;#in V
RC= 47*10**3;# collector resistance in Ω
RE= 43*10**3;# emitter resistance in Ω
vin1= 2.5*10**-3;# in V
Ri1= 20*10**3;# in Ω
Ri2= Ri1;# in Ω
VBE= 0.7;# in V
VT= 26*10**-3;# in V
beta1= 75;
beta2= 75;
IE= (VEE-VBE)/(2*RE+Ri1/beta1);#emitter current in A
ICQ= IE;# quiescent current in A
VCEQ= VCC+VBE-ICQ*RC;# quiescent collector voltage in V
re_desh= VT/IE;#AC emitter resistance in Ω
Ad= RC/(2*re_desh);# voltage gain
vout= Ad*vin1;# output voltage in V
print "The output voltage = %0.3f V" %vout

The output voltage = 0.217 V


## Example 1.11 - Page 26¶

In :
# Given data
VEE= 15 #in V
VD1= 0.7 # in V
VD2= 0.7 # in V
VBE= 0.7 # in V
Beta= 100
VT= 26 # in mV
R3= 180 #in Ω
RC= 470 # in Ω
VB3= -VEE+VD1+VD2 #in V
VE3= VB3-VBE #voltage at emitter terminal of transistor Q3 in V
IE3= (VE3-(-VEE))/R3 #emitter current through transistor Q3 in A

#Part  (i)
ICQ= IE3/2 #quiescent current in A
ICQ= round(ICQ*10**3) #in mA
IE= ICQ #emitter current in mA
print "Part (i) : Quiescent current = %0.f mA " %ICQ
VCEQ= VEE+VBE-ICQ*10**-3*RC #quiescent collector-emitter voltage in V
print "The quiescent collector-emitter voltage = %0.2f V" %VCEQ
re_desh= VT/IE #AC emitter resistance in Ω

# Part (ii)
Ad= RC/re_desh # differential voltage gain
print "Part (ii) : Differential voltage gain = %0.2f " %Ad

# Part (iii)
Rin1= 2*Beta*re_desh # in Ω
Rin1= Rin1*10**-3 # in kΩ
print "Part (iii) : The input resistance = %0.1f kΩ" %Rin1

Part (i) : Quiescent current = 2 mA
The quiescent collector-emitter voltage = 14.76 V
Part (ii) : Differential voltage gain = 36.15
Part (iii) : The input resistance = 2.6 kΩ


## Example 1.12 - Page 27¶

In :
# Given data
VEE= 10 #in V
VCC=10 # in V
VD1= 0.715 # in V
Vz= 6.2# in V
VBE= VD1 # in V
Izt= 41 # in mA
R3= 2.7 # in kΩ
RC= 4.7 # in kΩ
VT= 26 # in mV
beta_ac= 100
beta_dc= 100
VB3= -VEE+Vz+VD1 #voltage at the base of transistor Q3 in V
VE3= VB3-VBE # voltage at the emitter of transistor Q3 in V
IE3= (VE3-(-VEE))/R3 #emitter current through transistor Q3 in mA
ICQ= IE3/2 #quiescent current in mA
VCEQ= VCC+VBE-ICQ*RC # in V
print "Part (c) : The Q-point values : "
print "The value of ICQ = %0.3f mA" %ICQ
print "The value of VCEQ = %0.2f V" %VCEQ
re_desh= VT/ICQ #dynamic emitter resistance in Ω
Ad= RC*10**3/re_desh # voltage gain
print "Part (a) : The voltage gain = %0.1f" %Ad
Rin= 2*beta_ac*re_desh # differential input resistance in Ω
Rin=Rin*10**-3 # in kΩ
print "Part (b) : The differential input resistance = %0.2f kΩ" %Rin

Part (c) : The Q-point values :
The value of ICQ = 1.148 mA
The value of VCEQ = 5.32 V
Part (a) : The voltage gain = 207.5
Part (b) : The differential input resistance = 4.53 kΩ


## Example 1.13 - Page 31¶

In :
# Given data
VCC= 12 # in V
VBE= 0.7 # in V
R1= 25 # in kΩ
# I= I_REF= (VCC-VBE)/R1
I= (VCC-VBE)/R1 # mirrored current in mA
print "The mirrored current = %0.3f mA" %I

The mirrored current = 0.452 mA


## Example 1.14 - Page 31¶

In :
# Given data
VCC= 10 # in V
VBE= 0.7 # in V
R1= 15 # in kΩ
Beta= 100
I_REF= (VCC-VBE)/R1 #reference current in mA
print "The reference current = %0.2f mA" %I_REF
Iout= I_REF*Beta/(Beta+2) # output current in mA
print "The output current = %0.3f mA" %Iout

The reference current = 0.62 mA
The output current = 0.608 mA


## Example 1.15 - Page 32¶

In :
# Given data
VCC= 15 # in V
VBE= 0.7 # in V
R1= 2.2 # in kΩ
Beta= 220
I_REF= (VCC-VBE)/R1 #reference current in mA
# Formula : I= IC= I_REF*(Beta/(Beta+2))
IC= I_REF*Beta/(Beta+2) # in mA
print "The value of current = %0.2f mA" %IC

The value of current = 6.44 mA


## Example 1.16 - Page 32¶

In :
# Given data
Vz= 1.8 # in V
VBE= 0.7 # in V
RE= 1 # in kΩ
Beta= 180
VB= Vz-VBE # in V
IE= VB/RE #emitter current in mA
# Formula : I= IC= IE*(Beta/(Beta+1))
IC= IE*Beta/(Beta+1) # in mA
print "The value of current = %0.3f mA" %IC

The value of current = 1.094 mA


## Example 1.17 - Page 33¶

In :
# Given data
VCC= 9 # in V
R1= 12 # in kΩ
VBE= 0.7 # in V
Beta= 100
I_REF= (VCC-2*VBE)/R1 #reference current in mA
print "The reference current = %0.4f mA" %I_REF
Iout= I_REF/(1+2/(Beta*(1+Beta))) #output current in mA
print "The output current = %0.4f mA" %Iout
IC2= Iout #collector current in mA
print "The collector current = %0.4f mA" %IC2
# IB3= I_REF-IC1= I_REF-IC2  (since IC1= IC2)
IB3= I_REF-IC2 #base current of transistor Q3 in mA
IB3= IB3*10**3 # in µA
print "The base current of transistor Q3 = %0.1f µA" %IB3
IB3= 0.1 # in µA
IE3= (1+Beta)*IB3 # emitter current of transistor Q3 in µA
print "The emitter current of transistor Q3 = %0.1f µA" %IE3
IB1= IE3/2 #base current in µA
IB2= IB1 # in µA
print "The base current = %0.2f µA" %IB1

The reference current = 0.6333 mA
The output current = 0.6332 mA
The collector current = 0.6332 mA
The base current of transistor Q3 = 0.1 µA
The emitter current of transistor Q3 = 10.1 µA
The base current = 5.05 µA


## Example 1.18 - Page 33¶

In :
# Given data
VEE= 10 # in V
VBE= 0.715 # in V
beta_ac= 100
beta_dc= 100
R= 5.6 # in kΩ
I_REF= (VEE-VBE)/R # in mA
IC1= I_REF*beta_ac/(2+beta_ac) # in mA
# IC1= IC2= IC3  (by symmetry)
IC2= IC1 # in mA
IC3= IC2 # in mA
I_RC= IC1+IC2+IC3 # current through RC in mA
print "The current through RC = %0.2f mA" %I_RC

The current through RC = 4.88 mA


## Example 1.19 - Page 34¶

In :
# Given data
VCC= 5 # in V
VBE= 0.7 # in V
VEE= -5 # in V
VT= 26 # in mV
R= 18.6 # in kΩ
Beta= 100
I2= (VCC-VBE-VEE)/R # in mA
IC3= I2 # in mA (due to current mirror action)
IE= IC3/2 # emitter current of transistor Q1 and Q2
re_desh= VT/IE #AC emitter resistance of transistor in Ω
Rin1= 2*Beta*re_desh # in Ω
Rin1= Rin1*10**-3 # in kΩ
print "The differential input resistance = %0.1f kΩ" %Rin1

The differential input resistance = 20.8 kΩ


## Example 1.20 - Page 42¶

In :
# Given data
VCC= 18 # in V
R1= 4.7 # in kΩ
R2= 5.6 # in kΩ
R3= 6.8 # in kΩ
RE= 1.1 # in kΩ
VBE= 0.7 # in V
VT= 26 # in mV
RC= 1.8*10**3 # in Ω
IE1= (VCC*R1/(R1+R2+R3)-VBE)/RE # in mA
re_desh= VT/IE1 #dynamic resistance of each transistor in Ω
Av= -RC/re_desh # voltage gain of the cascode amplifier
print "The voltage gain of the cascode amplifier = %0.1f" %Av

The voltage gain of the cascode amplifier = -267.3