import math
Nd=7.0
N_start=1
N_stop=1
N_parity=1
Nt= Nd + N_start+ N_stop + N_parity
eff=Nd/Nt*100
print 'The efficiency is',eff,'%'
import math
m=21.0
for n in range (1,10): #we choose range of 1 to 10
a=m+n+1
b=2**n
if b>=a:
print 'hammming bits required=',n
break
end
end