x=72##given value in Decimal
print "Decimal number=",(x)
Str=bin(x)[2:]
print "Eqivalent Binary number=",(Str)#Binary value
x='1001000'##Binary value
print "Binary number=",(x)
Str=int(x,2)
print "Eqivalent Decimal number=",(Str)#decimal value
b='1001000'#
print "Binary number=",(b)#Binary value
d=int(b,2)# Binary to decimal value
o=oct(d)# Decimal to octal
print "Eqivalent Octal number=",(o)
x=72#
print "Decimal number=",(x)#Decimal value
Str=oct(x)#decimal to octal
print "Eqivalent Octal number=",(Str)
x='110'#
print "Octal number=",(x)#octal value
y=int(x,8)# octal to decimal
Str=bin(y)[2:] #decimal to binary
print "Eqivalent Binary number=",(Str)
x='110'#
print "Octal number=",(x)# octal value
Str=int(x,8)#octal to decimal
print "Eqivalent Decimal number=",(Str)
x=72#
print "Decimal number=",(x) #decimal value
Str=hex(x)[2:]# decimal to hexadecimal
print "Eqivalent Hexadecimal number=",(Str)
h='48'#
print "Hexadecimal number=",(h)# value in hexadecimal
d=int(h,16)#hexadecimal to decimal
print "Eqivalent Decimal number=",(d)
h='48'#
print "Hexadecimal number=",(h) #hexadecimal
d=int(h,16)# converting hexadecimal to decimal
Str=bin(d)[2:]# converting decimal to binary
print "Eqivalent Binary number=",(Str)
x='1001000'#
print "Binary number=",(x)#binary value
d=int(x,2)#binary to decimal
h=hex(d)[2:] #decimal to hexa decimal
print "Eqivalent hexadecimal number=",(h)
#for two digit decimal value to convert into BCD
#for two digit decimal value to convert into BCD
x='72'#
digits = [int(c) for c in x]
zero_padded_BCD_digits = [format(d, '03b') for d in digits]
print "Eqivalent BCD of 72 = ",
print ''.join(zero_padded_BCD_digits)