AchyuthaRao has asked for the wisdom of the Perl Monks concerning the following question:
I am currently learning Perl from the book "Beginning Perl" by Simon Cozens.
In one of the "Excercise" questions:
------------------------------------------
Q: Write a program that asks for a Decimal number less than 256 and converts it to Binary. (Hint: You may need to use the bitwise and operator, 8 times)
------------------------------------------
Could you kindly let me know the program? Please note that there were some other methods to solve this problem, but it would be great if you can write the program using the bitwise "and" operator only, as metioned in the question.
|
|---|