Chapter 9 Wired Digital Communications

Example 9.1 Page no 405

In [10]:
#given
M=110
x=7.0

#calculation
import math
a=math.log10(110)/(math.log10(2))
n=math.log(M)
b=2**a
u=(a/x)*100
y=math.log10(b)
u1=(y/3.0)*100

#result
print"the number of bits required = ",round(a,2)         #number of bits
print"The efficiency is ",round(u1,0),"percent"
the number of bits required =  6.78
The efficiency is  68.0 percent

Example 9.2 Page no 407

In [12]:
#given
m=10**7
Pe=10**-6         #error probability

#calculation
a=m*Pe            #average number of errors

#result
print"expected number of errors =",a
expected number of errors = 10.0

Example 9.3 Page no 407

In [17]:
#given
Tb=1/9600.0                    #bit frequency
Pt=0.8                         #transmit power

#calculation
Eb=Pt*Tb                       #energy per bit

#result
print"Energy per bit = ",round(Eb,7),"J"
Energy per bit =  8.33e-05 J

Example 9.4 Page no 410

In [2]:
#given
bw=3*10**3                    #bandwidth
x=1023                        #signal-to-noise ratio

#calculation
import math
C=bw*math.log(1+x)/math.log(2)           #capacity of telephone channel

#result
print"the capacity of a telephone channel =",C,"bit per second"
the capacity of a telephone channel = 30000.0 bit per second

Example 9.5 Page no 411

In [33]:
#given
Tb=1/(8.0*10**3)               #bit frequency
BWmin=1/(2.0*Tb)               #minimum bandwidth

#result
print"minimum bandwidth  = ",BWmin,"Hz"
minimum bandwidth  =  4000.0 Hz