hello all,
i m new to perl.

i need to decode some bits and represent accordingly back in hex.

for example:
0x00002017 is the data, i need to convert the whole value to binary
and see the bit status (for instance if bit 5 is set), then start
constructing the binary output value (set bit 3 in a 32-bit binary)
and repeat till the full binary input string is complete and decode
the output to hex and print.

i could make out the logic but dont know if i can do the following
steps in perl.
1. after doing a hex2bin conversion to 32-bit can i right shift by one
bit and then check the bit positions and accordingly OR it with a
temporary string one by one to make the output value.

please help

thanks
bala


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to