in reply to Bitwise operators

You appear to be working through a list of basic programming questions in Perl for the first time. I recommend you spend some time reading through the perlfaq documents, which are designed to cover this type of question. For example, this question is covered in perlfaq4 under "How do I convert between numeric representations/bases/radixes."

If you read through the documentation and are still stuck, then ask a more targeted question here and we will be happy to help you.