Chapter17-Bipolar Digital Circuits

Ex1-pg1115

In [1]:
import math

##Example 17.1
V1=5.;
V2=-5.;
Rc1=1.;
Rc2=Rc1;
Rc=Rc1;
Re=2.150;
v2=0.;
##for v1=0
vE=-0.7;
iE=(vE-V2)/Re;
print"%s %.2f %s"%('\nemitter current= ',iE,' mA\n')
iC=1.;
Vcc=5.;
vo1=Vcc-iC*Rc;
print"%s %.2f %s"%('\nvo1=vo2= ',vo1,' V\n')
##for v2=-1
vE=-0.7;
iE=2.;
iC2=2.;
vo1=5.;
vo2=Vcc-iC2*Rc;
print"%s %.2f %s"%('\nvo2= ',vo2,' V\n')
v1=1.;
Vbe=0.7;
vE=v1-Vbe;
iE=(vE-V2)/Re;
print"%s %.2f %s"%('\nemitter current =',iE,' mA\n')
iC1=iE;
vo1=Vcc-iC1*Rc;
print"%s %.2f %s"%('\nvo1= ',vo1,' V\n')
vo2=Vcc
emitter current=  2.00  mA


vo1=vo2=  4.00  V


vo2=  3.00  V


emitter current = 2.47  mA


vo1=  2.53  V

Ex2-pg1118

In [2]:
import math

##Example 17.2
Vx=-0.7;
Vy=Vx;
Vbe=0.7;
V2=-5.2;
Re=1.180;
vE=Vx-Vbe;
print"%s %.2f %s"%('\nemitter voltage = ',vE,'  V\n')
iE=(vE-V2)/Re;
print"%s %.2f %s"%('\nemitter current= ',iE,' mA\n')
Icxy=iE;
vo1=-0.7;
Rc1=-vo1/Icxy;
print"%s %.2f %s"%('\nRc1= ',Rc1,' KOhm\n')
Vnor=vo1-Vbe;
print"%s %.2f %s"%('\nNOR output logic 0 value= ',Vnor,' V\n')
Vr=(vo1+Vnor)/2.;
vE=Vr-Vbe;
print"%s %.2f %s"%('\nvE= ',vE,' V\n')
iE=(vE-V2)/Re;
print"%s %.2f %s"%('\niE= ',iE,' mA\n')
vo2=-0.7;
iC2=iE;
Rc2=-vo2/iC2;
print"%s %.2f %s"%('\nRc2= ',Rc2,' KOhm\n')
Vor=vo2-Vbe;
print"%s %.2f %s"%('\nOR logic 0 value is= ',Vor,' V\n')
emitter voltage =  -1.40   V


emitter current=  3.22  mA


Rc1=  0.22  KOhm


NOR output logic 0 value=  -1.40  V


vE=  -1.75  V


iE=  2.92  mA


Rc2=  0.24  KOhm


OR logic 0 value is=  -1.40  V

Ex3-pg1120

In [3]:
import math

##Example 17.3
Vr=-1.05;
Vbe=0.7;
Vb5=Vr+Vbe;
print"%s %.2f %s"%('\nVb5 = ',Vb5,' V\n')
R1=0.250;
i1=-Vb5/R1;
print"%s %.2f %s"%('\ni1= ',i1,' mA\n')
Vy=0.7;
V2=-5.2;
##let R1+R2=x
x=(-2.*Vy-V2)/i1;
R2=x-R1;
print"%s %.2f %s"%('\nR2= ',R2,' KOhm\n')
iS=i1;
Rs=(Vr-V2)/iS;
print"%s %.2f %s"%('\nRs= ',Rs,' KOhm\n')
Vb5 =  -0.35  V


i1=  1.40  mA


R2=  2.46  KOhm


Rs=  2.96  KOhm

Ex4-pg1121

In [4]:
import math

##Example 17.4
Vx=-0.7;
Vy=-0.7;
iCxy=3.22;##(mA)
iCR=0.;
i5=1.40;
i1=1.40;
Vor=-0.7;
R4=1.500;
Vnor=-1.4;
V2=-5.2;
R3=1.500;
i3=(Vor-V2)/R3;
print"%s %.2f %s"%('\ncurrent i3= ',i3,' mA\n')
i4=(Vnor-V2)/R4;
print"%s %.2f %s"%('\ncurrent i4 = ',i4, 'mA')
P=(iCxy+iCR+i5+i1+i3+i4)*(0.-V2);
print"%s %.2f %s"%('\npower dissipation= ',P,' mW\n')
current i3=  3.00  mA


current i4 =  2.53 mA

power dissipation=  60.08  mW

Ex5-pg1122

In [5]:
import math

##Example 17.5
b=50.;
V2=-5.2;
Vbe=0.7;
Rc2=0.240;
Vor=-0.75;
Re=1.180;
iE=(Vor-Vbe-V2)/Re;
print"%s %.2f %s"%('\nemitter current= ',iE,' mA\n')
iB=iE/(1.+b);
iB=iB*1000.;##micro A
print"%s %.2f %s"%('\ninput base current= ',iB,' microA\n')
R3=1.500;
i3=(Vor-V2)/R3;
print"%s %.2f %s"%('\ni3= ',i3,' mA\n')
iB=iB*0.001;##mA
N=(-(Vor+Vbe)*(1.+b)/(Rc2)-i3)/iB;
print"%s %.2f %s"%('\nN\n',N,'')
emitter current=  3.18  mA


input base current=  62.31  microA


i3=  2.97  mA


N
 122.90 

Ex7-pg1127

In [6]:
import math
 
##Example 17.7
Vcc=1.7;
Re=0.008;##mohm
Rc=0.008;##mohm
Vy=0.4;
Vbe=0.7;
Vor=Vcc##logic 1
Vor=Vcc-Vy##logic 0
Vr=1.5;
iE=(Vr-Vbe)/Re;
print"%s %.2f %s"%('\nemitter current= ',iE,' microA\n')
iR=Vy/Rc;
print"%s %.2f %s"%('\nmaximum current in Rc = ',iR,' microA\n')
iD=iE-iR;
print"%s %.2f %s"%('\ncurrent through the diode= ',iD,' microA\n')
P=iE*Vcc;
print"%s %.2f %s"%('\npower dissipation= ',P,' microW\n')
Vv=1.7;
iE=(Vv-Vbe)/Re;
print"%s %.2f %s"%('\niE = ',iE,' microA\n')
P=iE*Vcc;
print"%s %.2f %s"%('\npower dissipation = ',P,' microW\n')
emitter current=  100.00  microA


maximum current in Rc =  50.00  microA


current through the diode=  50.00  microA


power dissipation=  170.00  microW


iE =  125.00  microA


power dissipation =  212.50  microW

Ex9-pg1142

In [7]:
import math

##Example 17.9
bf=25.;
b=bf;
br=0.1;
Vcc=5.;
R1=4.;
Vbc=0.7;
Vy=0.1;
Vx=0.1;
R2=1.6;
Vbe=0.8;
Rc=4.;
Vce=0.1;
vB2=Vx+Vce;
print"%s %.2f %s"%('\nvB2= ',vB2,' V\n')
vB1=Vx+Vbe;
print"%s %.2f %s"%('\nbase voltage= ',vB1,' V\n')
i1=(Vcc-vB1)/R1;
print"%s %.2f %s"%('\ncurrent i1= ',i1,' mA\n')
vB1=Vbe+Vbe+Vbc;
print"%s %.2f %s"%('\nvB1= ',vB1,' V\n')
vC2=Vbe+Vce;
print"%s %.2f %s"%('\ncollector voltage= ',vC2,' V\n')
i1=(Vcc-vB1)/R1;
print"%s %.2f %s"%('\ncurrent i1 = ',i1,' mA\n')
iB2=(1.+2.*br)*i1;
print"%s %.2f %s"%('\niB2= ',iB2,' mA\n')
i2=(Vcc-vC2)/R2;
print"%s %.2f %s"%('\ni2 = ',i2,' mA\n')
iE2=i2+iB2;
print"%s %.2f %s"%('\niE2= ',iE2,' mA\n')
Rb=1.;
i4=Vbe/Rb;
print"%s %.2f %s"%('\ncurrent in the pull down resistor= ',i4,' mA\n')
iBo=iE2-i4;
print"%s %.2f %s"%('\nbase drive to the output transistor= ',iBo,' mA\n')
i1=(Vcc-Vce)/Rc;
print"%s %.2f %s"%('\ni1= ',i1,' mA\n')
vB2=  0.20  V


base voltage=  0.90  V


current i1=  1.02  mA


vB1=  2.30  V


collector voltage=  0.90  V


current i1 =  0.68  mA


iB2=  0.81  mA


i2 =  2.56  mA


iE2=  3.37  mA


current in the pull down resistor=  0.80  mA


base drive to the output transistor=  2.57  mA


i1=  1.23  mA

Ex11-pg1150

In [8]:
import math

##Example 17.11
b=25.;
iB=1.;
iC=2.;
ic=(iB+iC)/(1.+1./b);
print"%s %.2f %s"%('\ninternal collector current= ',ic,' mA\n',)
ib=ic/b;
print"%s %.2f %s"%('\ninternal base current = ',ib,' mA\n')
iD=iB-ib;
print"%s %.2f %s"%('\nSchottky diode current= ',iD,' mA\n')
iC=20.;
ic=(iB+iC)/(1.+1./b);
print"%s %.2f %s"%('\ninternal collector current= ',ic,' mA\n')
ib=ic/b;
print"%s %.2f %s"%('\ninternal base current = ',ib,' mA\n')
iD=iB-ib;
print"%s %.2f %s"%('\nSchottky diode current= ',iD,' mA\n')
internal collector current=  2.88  mA


internal base current =  0.12  mA


Schottky diode current=  0.88  mA


internal collector current=  20.19  mA


internal base current =  0.81  mA


Schottky diode current=  0.19  mA

Ex12-pg1154

In [9]:
import math

##Example 17.12
Vy=0.3;
Vbe=0.7;
vx=0.4;
R2=8.;
Vce=0.4;
Vcc=5.;
b=25.;
Vce=0.4;
Vbe1=0.7;
Vbe2=0.7;
Vcc=5.;
R1=20.;
v1=Vce+Vy;
i1=(Vcc-v1)/R1;
print"%s %.2f %s"%('\ni1= ',i1,' mA\n')
Pl=i1*(Vcc-vx);
print"%s %.2f %s"%('\npower dissipation= ',Pl,' mW\n')
v1=Vbe1+Vbe2;
print"%s %.2f %s"%('\nv1= ',v1,' V\n')
vC2=Vbe1+Vce;
print"%s %.2f %s"%('\nvoltage vC2  =',vC2,' V\n')
i1=(Vcc-v1)/R1;
print"%s %.2f %s"%('\ncurrent i1 = ',i1,' mA\n')
i2=(Vcc-vC2)/R2;
print"%s %.2f %s"%('\ncurrent i2 = ',i2,' mA\n')
P=(i1+i2)*Vcc;
print"%s %.2f %s"%('\npower dissipation for high input condition= ',P,' mW\n')
i1=  0.21  mA


power dissipation=  0.99  mW


v1=  1.40  V


voltage vC2  = 1.10  V


current i1 =  0.18  mA


current i2 =  0.49  mA


power dissipation for high input condition=  3.34  mW