in reply to Dec to Hex (NON-ASCII mode )
sprintf returns a string so if you try to get ascii value of returned string, you get value of character "6" and "4" rather than that of 6 and 4.
Not completely sure what do you want to do but if you want to get a binary representation of 100(dec) in a string you can use "%b"
perl -le '$_ = sprintf("%b", 100);print'Output:
1100100
|
---|