# Chapter 3 : Bi Polar Junction Transistor¶

## Example 3.1, Page No. 82¶

In :
# varitation in alpha and value of beta

import math
#Variable declaration
Beta=50.0         #amlification factor
dbb=1.0           #percentage variation in degree celsius
daa=dbb/50.0      #variation in degree celsius
temp=325.0        #in K
t=25              #degree celsius

#Calculations
Beta1=dbb*t
nBeta=Beta+(Beta1/100)*t

#Result
print("(b) variation in alpha for a silicon BJT is ,(%%/degree-Celsius) = %.2f"%daa)
print("(c) new value of Beta is , = %.2f"%nBeta)

(b) variation in alpha for a silicon BJT is ,(%/degree-Celsius) = 0.02
(c) new value of Beta is , = 56.25


## Example 3.2, Page No.83¶

In :
# current amplification factor

import math
#Variable declaration
del_Ic=1*10**-3             # in A
del_Ib=50*10**-6            # in A

#Calcualtions
Beta=del_Ic/del_Ib;
print("The current amplification factor,Beta = %.f"%Beta)

The current amplification factor,Beta = 20


## Example 3.3, Page No.83¶

In :
# base current

import math
#Variable declaration
alfa=0.88          # Alfa
Ie=1               # in mA

#Calcualtions
Ic=alfa*Ie
I_B=Ie-Ic

#Result
print("Base current,(mA) = %.2f"%I_B)

Base current,(mA) = 0.12


## Example 3.4, Page No.83¶

In :
# short circuit current gain

import math
#Variable declaration
del_Ic=0.95*10**-3 # in A
del_Ie=1*10**-3     # in A

#Calculations
alfa=del_Ic/del_Ie;
print("the short circuit current gain, = %.2f"%alfa)

the short circuit current gain, = 0.95


## Example 3.5, Page No. 83¶

In :
# collector and base current

import math
#Variable declaration
Ie=5*10**-3            # in A
alfa=0.95              # Alfa
I_co=10*10**-6         # in A
Ic=((alfa*Ie)+I_co)*10**3
Ib=(Ie-(Ic*10**-3))*10**6
print("Collector current,(mA) = %.2f"%Ic)
print("Base current,(micro-A) = %.f"%Ib)

Collector current,(mA) = 4.76
Base current,(micro-A) = 240


## Example 3.6, Page No. 84¶

In :
# Ic Ib and Iceo

import math
#Variable declaration
Ie=5.0                # in mA
alfa=0.99             # Alfa
I_co=0.005            # in mA

#CAlculations
Ic=((alfa*Ie)+I_co)
Ib=(Ie-Ic)
Beta=alfa/(1-alfa)
I_CEO=I_co/(1-alfa)

#Result
print("Ic,(mA)        = %.3f"%Ic)
print("Ib,(micro-A)   = %.f"%(Ib*10**3))
print("Beta           = %.f"%Beta)
print("I_CEO(micro-A) = %.f"%(I_CEO*10**3))

Ic,(mA)        = 4.955
Ib,(micro-A)   = 45
Beta           = 99
I_CEO(micro-A) = 500


## Example 3.7, Page No. 84¶

In :
# change in collector current

import math
#Variable declaration
alfa=0.9            # constant
Del_Ib=4            # in mA

#Caculations
Beta=alfa/(1-alfa)
Del_Ic=Beta*Del_Ib;

#Result
print("The change in the collector current,(mA) = %.f"%Del_Ic)

The change in the collector current,(mA) = 36


## Example 3.8, Page No. 84¶

In :
# emitter current

import math
#Variable declaration
Beta=40.0      #beta
Ib=25.0        # base current in micro-A

#Calculation
Ic=Beta*Ib;
Ie=(Ib+Ic)*10**-3
print("Ie,(mA) = %.3f"%Ie)

Ie,(mA) = 1.025


## Example 3.9, Page No. 85¶

In :
# beta

import math
#Variable declaration
alfa=0.98            # constant

#Calculation
Beta=alfa/(1-alfa)

#Result
print("Beta =  %.f"%Beta)

Beta =  49


## Example 3.10, Page No. 85¶

In :
# error

import math
#Variable declaration
Beta=100.0       # constant
Ib=20*10**-6     # in A
I_co=500*10**-9  # in A

#Calculation
Ic1=((Beta*Ib)+(1+Beta)*I_co)*10**3
Ic2=(Beta*Ib)*10**3
Error=(Ic1-Ic2)*100.0/Ic1

#Result
print("The error,(%%) = %.2f"%Error)
#answer is wrong in the txtbook

The error,(%) = 2.46


## Example 3.11, Page No.85¶

In :
# change in base current

import math
#Variable declaration
alfa=0.98
del_Ie=5.0          # in mA

#Calculations
del_Ic=alfa*del_Ie  # in mA
del_Ib=del_Ie-del_Ic;

#Result
print("change in base current,(mA) = %.1f"%del_Ib)

change in base current,(mA) = 0.1


## Example 3.12, Page No. 86¶

In :
# collector current base current and alfa

import math
#Variable declaration
Ie=8.4           # in mA
cr=0.8/100       # carriers recombine in base in %

#Calculations
Ib=cr*Ie
Ic=Ie-Ib
alfa=Ic/Ie

#Result
print("(a). The base current,Ib(mA) = %.3f"%Ib)
print("(b). The collector current,Ic(mA) = %.2f"%Ic)
print("(c). the value of alfa = %.3f"%alfa)

(a). The base current,Ib(mA) = 0.067
(b). The collector current,Ic(mA) = 8.33
(c). the value of alfa = 0.992


## Example 3.13, Page No. 86¶

In :
# ac current gain

import math
#Variable declaration
Ie1=20.0       # in mA
Ie2=15.0       # in mA
Ib1=0.48       # in mA
Ib2=0.32       # in mA

#Calculation
del_Ie=(Ie1-Ie2)*10**-3
del_Ib=(Ib1-Ib2)*10**-3
del_Ic=del_Ie-del_Ib
alfa=del_Ic/del_Ie
Beta=del_Ic/del_Ib

#Result
print("ac current gain in common base arrangement,    = %.2f"%alfa)
print("ac current gain in common emitter arrangement, = %.f"%Beta)

ac current gain in common base arrangement,    = 0.97
ac current gain in common emitter arrangement, = 30


## Example 3.14, Page No. 87¶

In :
# Beta Iceo and collector current

import math
#Variable declaration
alfa=0.992         # constant
Ib=30*10**-6       # in A
I_CBO=48*10**-9    # in A

#Result
Beta=alfa/(1-alfa)
I_CEO=(1+Beta)*I_CBO*10**6
Ic=((Beta*Ib)+(1+Beta)*I_CBO)*10**3

#Result
print("(a) Beta = %.f"%Beta)
print("(a) I_CEO (micro-A) = %.f"%I_CEO)
print("(b) Collector current,Ic(mA) = %.2f"%(math.floor(Ic*100)/100))

(a) Beta = 124
(a) I_CEO (micro-A) = 6
(b) Collector current,Ic(mA) = 3.72


## Example 3.15, Page No. 87¶

In :
# collector current alfa and beta

import math
#Variable declaration
Ie=9.6             # emitter current in mA
Ib=0.08            # base current in mA
alfa=0.99

Ic=Ie-Ib
alfa=math.floor(Ic*100/Ie)/100
Beta=alfa/(1-alfa)

#Result
print("(a). collector current,Ic(mA) = %.2f"%Ic)
print("(b). alfa = %.2f"%alfa)
print("(c). Beta = %.f"%Beta)

(a). collector current,Ic(mA) = 9.52
(b). alfa = 0.99
(c). Beta = 99


## Example 3.16, Page No.87¶

In :
# collector current

import math
#Variable declaration
Ib=68*10**-6      # in A
Ie=30*10**-3      # in A
Beta=440.0        # constant

#Calculations
alfa=Beta/(1+Beta)
Ic=alfa*Ie*10**3

#Result
print("Collector current,Ic(mA) = %.2f"%Ic)

Collector current,Ic(mA) = 29.93