Decimal to binary conversion in python