import math
#given data
ro=1.72*10**-8 #resistivity of Cu
s=1/ro #conductivity of Cu
n=10.41*10**28 #no of electron per unit volume
e=1.6*10**-19 #charge on electron
u=s/(n*e)
print"mobility of electron in Cu =","{0:.3e}".format(u),"m^2/volt-sec"
import math
#given data
m=63.5 #atomic weight
u=43.3 #mobility of electron
e=1.6*10**-19 #charge on electron
N=6.02*10**23 #Avogadro's number
d=8.96 #density
Ad=N*d/m #Atomic density
n=1*Ad
ro=1/(n*e*u)
print"Resistivity of Cu =","{0:.3e}".format(ro),"ohm-cm"
import math
#given data
e=1.6*10**-19 #charge on electron
ne=2.5*10**19 #density of carriers
nh=ne #for intrinsic semiconductor
ue=0.39 #mobility of electron
uh=0.19 #mobility of hole
s=ne*e*ue+nh*e*uh #conductivity of Ge
ro=1.0/s #resistivity of Ge
print"Resistivity of Ge =",round(ro,4),"ohm-m"
import math
#given data
Eg=1.2 #energy gap
T1=600 #temperature
T2=300 #temperature
#since ue>>uh for intrinsic semiconductor
#s=ni*e*ue
K=8.62*10**-5 #Boltzman constant
s=1l
s1=s*exp((-Eg)/(2*K*T1))
s2=s*exp((-Eg)/(2*K*T2))
m=(s1/s2)
print'Ratio between conductivity =',"{0:.3e}".format(m)
import math
#given data
c=5*10**28 #concentration of Si atoms
e=1.6*10**-19 #charge on electron
u=0.048 #mobility of hole
s=4.4*10**-4 #conductivity of Si
#since millionth Si atom is replaced by an indium atom
n=c*10**-6
sp=u*e*n #conductivity of resultant
print"conductivity =",(sp),"mho/m"
import math
#given data
m=28.1 #atomic weight of Si
e=1.6*10**-19 #charge on electron
N=6.02*10**26 #Avogadro's number
d=2.4*10**3 #density of Si
p=0.25 #resistivity
#no. of Si atom/m**3
Ad=N*d/m #Atomic density
#impurity level is 0.01 ppm i.e. 1 atom in every 10**8 atoms of Si
n=Ad/10**8 #no of impurity atoms
#since each impurity produce 1 hole
nh=n
print"1) hole concentration =",round(n,4),"holes/m^3"
up=1/(e*p*nh)
print"2) mobility =",round(up,4),"m^2/volt.sec"
import math
#given data
t=27 #temp in degree
T=t+273 #temp in kelvin
K=8.62*10**-5 #Boltzman constant in eV
Eg=1.12 #Energy band gap
#For intrensic semiconductor (Ec-Ev)=Eg/2
#let (Ec-Ev)=m
m=Eg/2
a=(m/(K*T))
#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))
p=1/(1+exp(a))
print"probability of an electron being thermally excited to conduction band=","{0:.3e}".format(p)
import math
#given data
T=300 #temp in kelvin
K=8.62*10**-5 #Boltzman constant in eV
m=0.012 #energy level(Ef-E)
a=(m/(K*T))
#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))
p=1.0/(1+exp(a))
p1=1-p
print"probability of an energy level not being occupied by an electron=",round(p1,4)
import math
#given data
t=20 #temp in degree
T=t+273 #temp in kelvin
K=8.62*10**-5 #Boltzman constant in eV
Eg=1.12 #Energy band gap
#For intrensic semiconductor (Ec-Ev)=Eg/2
#let (Ec-Ev)=m
m=Eg/2
a=(m/(K*T))
#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))
p=1.0/(1+exp(a))
print"probability of an electron being thermally excited to conduction band=","{0:.3e}".format(p)
import math
#given data
T=300 #temp in kelvin
K=8.62*10**-5 #Boltzman constant in eV
Eg=2.1 #Energy band gap
#probability f(Ec)=1/(1+exp((Ec-Ev)/(K*T))
m=K*T
#for f(E)=0.99
p1=0.99
b=abs(1.0-(1.0/p1))
a=math.log(b) #a=(E-2.1)/m
E=2.1+m*a
print"1) Energy for which probability is 0.99=",round(E,4),"eV"
#for f(E)=0.01
p2=0.01
b2=abs(1-1.0/p2)
a1=math.log(b2) #a=(E-2.1)/m
E1=2.1+m*a1
print"2)Energy for which probability is 0.01=",round(E1,4),"eV"
import math
#given data
ni=2.4*10**19 #density of intrensic semiconductor
n=4.4*10**28 #no atom in Ge crystal
Nd=n/10**6 #density
Na=Nd
e=1.6*10**-19 #charge on electron
T=300 #temerature at N.T.P.
K=1.38*10**-23 #Boltzman constant
Vo=(K*T/e)*log(Na*Nd/(ni**2))
print"Potential barrier for Ge =",round(Vo,4),"Volts"
import math
#given data
B=0.6 #magnetic field
d=5*10**-3 #distancebetween surface
J=500 #current density
Nd=10**21 #density
e=1.6*10**-19 #charge on electron
Vh=(B*J*d)/(Nd*e) #due to Hall effect
print"Hall voltage =","{0:.3e}".format(Vh),"Volts"
import math
#given data
Rh=6*10**-7 #Hall coefficient
B=1.5 #magnetic field
I=200 #current in strip
W=1*10**-3 #thickness of strip
Vh=Rh*(B*I)/W #due to Hall effect
print"Hall voltage =",(Vh),"Volt"
import math
#given data
Rh=2.25*10**-5 #Hall coefficient
u=0.025 #mobility of hole
r=Rh/u
print"Resistivity of P type silicon =","{0:.3e}".format(r),"ohm-m"
import math
#given data
B=0.55 #magnetic field
d=4.5*10**-3 #distancebetween surface
J=500 #current density
n=10**20 #density
e=1.6*10**-19 #charge on electron
Rh=1/(n*e) #Hall coefficient
Vh=Rh*B*J*d #Hall voltage
print"1) Hall voltage =",round(Vh,4),"Volts"
print"2) Hall coefficient =",(Rh),"m^3/C"
u=0.17 #mobility of electrom
m=math.atan(u*B)
a=m*180/math.pi #conversion randian into degree
print"3) Hall angle =",round(a,4),"degree"
import math
#given data
Rh=3.66*10**-4 #Hall coefficient
r=8.93*10**-3 #resistivity
e=1.6*10**-19 #charge on electron
#Hall coefficient Rh=1/(n*e)
n=1/(Rh*e) #density
print"1) density(n) =",round(n,4),"/m^3"
u=Rh/r #mobility of electron
print"2) mobility (u) =",round(u,4),"m^2/v-s"
import math
#given data
B=0.2 #magnetic field
e=1.6*10**-19 #charge on electron
ue=0.39 #mobility of electron
l=0.01 #length
A=0.001*0.001 #cross section area of bar
V=1*10**-3 #Applied voltage
d=0.001 #sample of width
r=1/(ue*e) #resistivity
R=r*l/A #resistance of Ge bar
#using ohm's law
I=V/R
Rh=r*ue #hall coefficient
#using formulae for hall effect
J=I/A #current density
Vh=Rh*B*J*d
print"Hall voltage =",(Vh)
import math
#given data
x1=0.4 #difference between fermi level and conduction band(Ec-Ef)
T=300 #temp in kelvin
K=8.62*10**-5 #Boltzman constant in eV
#ne=N*e**(-(Ec-Ef)/(K*T))
#ne is no of electron in conduction band
#since concentration of donor electron is doubled
a=2 #ratio of no of electron
#let x2 be the difference between new fermi level and conduction band(Ec-Ef')
x2=-math.log(a)*(K*T)+x1 #arranging equation ne=N*e**(-(Ec-Ef)/(K*T))
print"Fermi level will be shifted towards conduction band by",round(x2,4),"eV"