#given
n=3 #shift registers
n1=7
#calculation
x=(2**n)-1
y=(2**7)-1
#result
print"(a) n =",n,"PN sequence length = ",x
print"(b) n =",n1,"PN sequence length = ",y
#given
x=56.0 #modulation bit rate
y=560 #chip rate
a=256.0 #modulation bit rate
b=1792 #chip rate
#calculation
z=y/x
c=b/a
#result
#part(a)
print"Spreading of a DSSS signal = ",z
print"Spreading of a DSSS signal = ",c