In [2]:

```
un1=3800 #mobility of free electrons in pure germanium
up1=1800 #mobility of free holes in pure germanium
un2=1300 #mobility of free electrons in pure silicon
up2=500 #mobility of free holes in pure silicon
q=1.6*10**-19
nig=2.5*10**13
nis=1.5*10**10
sigma1=q*nig*(un1+up1)
print "(i) The intrinsic conductivity for germanium,"
print "sigmai(S/cm) = q*ni*(un+up) = %0.2f"%sigma1
sigma2=q*nis*(un2+up2)
print "(ii) The intrinsic conductivity for silicon,"
print "sigmai(S/cm)= q*ni*(un+np) =%0.2e"%sigma2
```

In [4]:

```
ni=1.5*10**10
un=1300
up=500
q=1.6*10**-19
nos=5*10**22
print "(a) In intrensic condition, n=p=ni"
print "Hence, sigma_i = q*ni*(un+up)"
sigma_i = q*ni*(un+up)
print "sigma_i = %0.2e S/cm"%sigma_i
print "(b) Number of silicon atoms/cm**3 = 5*10**22"
ND=5*10**22/10**8
print "Hence, ND = %0.2e cm**-3"%ND
print "Further, n = ND"
print "Therefore, p = ni**2/n = ni**2/ND"
p=ni**2/ND
print "p = %0.2e cm**-3"%p # wrong answer in textbook
print "Thus p << n. Hence p may be neglected while calculating the conductivity."
print "Hence, sigma = n*q*un = ND*q*un"
sigma=ND*q*un
print "sigma = %0.2f S/cm"%sigma
NA=(5*10**22)/(5*10**7)
print "(c) NA = %0.2e cm**-3"%NA
print "Further, p = NA"
print "Hence, n = ni**2/p = ni**2/NA"
n=ni**2/NA
print "n = %0.2e cm**-3"%n
print "Thus p >> n. Hence n may be neglected while calculating the conductivity."
print "Hence, sigma = p*q*up = NA*q*up"
sigma1=NA*q*up
print "sigma = %0.2f S/cm"%sigma1
print "(d) With both types of impurities present simultaneously, the net acceptor impurity density is,"
Na=NA-ND
print "Na = %0.2e cm**-3"%Na
print "Hence, sigma = Na*q*up"
sigma2=Na*q*up
print "sigma = %0.2f S/cm"%sigma2
```

In [10]:

```
ni=2.5*10**13
un=3800
up=1800
nog=4.4*10**22
q=1.6*10**-19
sigma=q*ni*(un+up)
print "(a) n = p = ni = 2.5*10**13 cm**-3"
print "Therefore, conductivity, sigma = q*ni*(un+np) =%0.2f S/cm"%sigma
rho=1/sigma
print "Hence, resistivity rho = 1 / sigma =%0.2f (ohm-cm)"%rho
ND=(4.4*10**22)/10**7
print "\n(b) ND = %0.2e cm**-3"%ND
p=ni**2/ND
print "Also, n = ND"
print "Therefore, p = ni**2 / n = ni**2 / ND =%0.2f (holes/cm**3)"%p
print "Here, as n >> p, p can be neglected."
sigma1=ND*q*un
print "Therefore, conductivity, sigma = n*q*un = ND*q*un =%0.2f (S/cm)"%sigma1
rho1=1/sigma1
print "Hence, resistivity, rho = 1 / sigma =%0.2f (ohm-cm)"%rho1
NA=(4.4*10**22)/10**8
print "\n(c) NA = %0.2e (cm**-3)"%NA
print "Also, p = NA"
n=ni**2/NA
print "Therefore, n = ni**2 / p = ni**2 / NA =%0.2f (electrons/cm**3)"%n
sigma2=NA*q*up
print "Here, as p >> n, n may be neglected. Then,"
print "Conductivity, sigma = p*q*up = NA*q*up =%0.2f (S/cm)"%sigma2
rho2=1/sigma2
print "Hence, resistivity, rho = 1 / sigma = %0.2f (ohm-cm)"%rho2
print "\n(d) with both p and n type impurities present,"
print " ND = 4.4*10**15 cm**-3 and NA = 4.4*10**14 cm**-3"
print "Therefore, the net donor density ND'' is"
Nd=ND-NA
print "ND'' = (ND - NA) =%0.2f (cm**-3)"%Nd
print "Therefore, effective n = ND'' = 3.96*10**15 cm**-3"
p1=ni**2/Nd
print "p = ni**2 / N''D =%0.2f (cm**-3)"%p1
print "Here again p(= ni**2 / N''D) is very small compared with N''D and may be neglected in calculating the effective conductivity."
sigma3=Nd*q*un
print "Therefore, conductivity, sigma = ND''*q*un =%0.2f (S/cm)"%sigma3
rho3=1/sigma3
print "Hence, resistivity, rho = 1 / sigma =%0.2f (ohm-cm)"%rho3
```

In [13]:

```
un=1250
up=475
q=1.6*10**-19
sigma_i=1/(25*10**4)
format(9)
ni=1/((25*10**4)*(1.6*10**-19)*(1250+475))
print "sigma_i = qni(un+up) = 1 / 25*10**4"
print "\nTherefore, ni = sigma_i / q(un+up) =%0.2f"%ni
ND=(4*10**10)-10**10
print "\nNet donor density, ND(= n) = %0.2e (cm**-3)"%ND
p=ni**2/ND
print "Hence, p = ni**2 / ND =%0.2f (cm**-3)"%p
sigma=(1.6*10**-19)*((1250*3*10**10)+(475*0.7*10**10))
print "Hence, sigma = q*(n*un + p*up) =%0.2f"%sigma
J=6.532*4*10**-6
print "Therefore, total conduction current density, J = sigma*E =%0.2f A/cm**2"%J
```

In [18]:

```
ni=1.5*10**10
un=1300
up=500
q=1.6*10**-19
sigma=300
print "(a) Concentration in N-type silicon"
format(10)
n=sigma/(q*un)
print "The conductivity of an N-type Silicon is sigma = q*n*un"
print "Concentratoin of electrons, n = sigma / q*un =%0.2e (cm**-3)"%n
p=ni**2/n
print "Hence, concentration of holes, p = ni**2 / n =%0.2e (cm**-3)"%p
print "(b) Concentration in P-type silicon"
p=sigma/(q*up)
print "The conductivity of a P-type Silicon is sigma = q*p*up"
print "Hence, concentratoin of holes, p = sigma / q*up =%0.2e (cm**-3)"%p
n=ni**2/p
print "and concentration of electrons, n = ni**2 / p = %0.2f (cm**-3)"%n
```

In [20]:

```
ND=(4.2*10**28)/10**6
print "Density of added impurity atoms is, ND = %0.2e (atoms/m**3)"%ND
ni=2.5*10**19
p=ni**2/ND
print "Also, n = ND"
print "Therefore, p = ni**2 / n = ni**2 / ND =%0.2e (m**-3)"%p
print "Here, as p << n, p may be neglected."
q=1.6*10**-19
un=0.38
sigma=q*ND*un
print "Therefore, sigma = q*ND*un =%0.2f (S/m)"%sigma
rho=1/sigma
print "Therefore, resistivity, rho = 1 / sigma =%0.2f ohm-m"%rho
L=5*10**-3
A=5*10**-6
R=(rho*L)/A**2
R1=R*10**-3
print "Resistance, R = rho*L / A =%0.2f kohm"%R1
I=10**-6
V=R*I
V1=V*10**3
print "Voltage drop, V = RI =%0.2f mV"%V1
```

In [25]:

```
from math import log
q=1.6*10**-19
ni=2.5*10**13
up=1800
un=3800
VT=0.026
rho=6
format(9)
NA=1/(6*q*up)
print "(a) Resistivity, rho = 1 / sigma = 1 / NA*q*up = 6 ohm-cm"
print "Therefore, NA = 1 / 6*q*up =%0.2e (1/cm**3)"%NA
ND=1/(4*q*un)
print "Similarly, ND(1/cm**3) = 1 / 4*q*un =%0.2e (1/cm**3)"%ND
Va=VT*log((ND*NA)/ni**2)
print "Therefore, Va = VT*ln(ND*NA / ni**2) = %0.2f V"%Va
print "Hence, Eo = %0.2f eV"%Va
Va1=0.026*log((2*ND*2*NA)/ni**2)
print "\n(b) Vo = 0.026*ln(2*ND*2*NA / ni**2) =%0.2f V"%Va1
print "Therefore, Eo(eV) = %0.2f eV"%Va1
```

In [26]:

```
from math import exp
Ia=0.3*10**-6
VF=0.15
I=Ia*((exp(40*VF))-1)
I1=I*10**6
print "The current flowing through the PN diode under forward bias is,"
print "I = Io*(e**40*VF - 1) =%0.2f uA"%I1
```

In [28]:

```
from math import exp
VF=0.6
T=298
Io=10**-5
eta=2
VT=T/11600.0
print "The volt-equivalent of the temperature(T) is,"
print "VT(V) = T / 11600 = %0.2f"%VT
I=Io*((exp((VF/(eta*VT))))-1)
print "Therefore, the diode current, I = Io*e**((VF/eta*VT)-1) =%0.2f A"%I
```

In [1]:

```
I=5*10**-3
T=300
print "Forward resistance of a PN junction diode, rf = (eta*VT)/I where VT = T/11600 and eta = 2 for silicon"
print "Therefore, rf = 2*(T/11600) / 5*10**-3"
eta=2 #for silicon
rf=600/(11600*5*10**-3)
print "rf = %0.2f ohm"%rf
```

In [2]:

```
Io1=7.5*10**-6
T1=27
T2=127
print "The saturation current at 400 K is,"
print "Io2 = Io1 * 2**((T2-T1)/10)"
print " = 7.5*10**-6 * 2**(127-27/10)"
Io2=Io1*(2**((T2-T1)/10))
I=Io2*10**3
print "Io2 = %0.2f mA"%I
```