Is your number an integer? Is it stored in a file, in a perl variable, the perl code, or other? Do you want to address individual bits in the result, or do you want to display it on your screen? Write it to a file? Or other? You probably have already received the right answer. All you have to do is choose the one that guessed the right answers to these questions. That may not be easy. I suggest that you tell us what you want to accomplish. It probably can be done without your conversion at all. If it is required, we will be able to give you the answer that best fits your real needs.