I want to convert decimal number to exact same binary number. Eg. Decimal (10) to Binary (10). Dec(10000001110000110) to binary(10000001110000110).
I am new to perl. The Lame approach I can think of is to convert dec to string and string to binary but I am sure there has to be a better way to achieve it.
I am using a function to get an array of decimal numbers.
@Arr= {111110000,110100010,...}
Note this is decimal number since when I tried to subtract 1 from it's elements I got 11110000-1=11109999.
I need it in binary format so that I can do a logical AND operation on it.
Can someone please suggest on how to achieve it.