Scripting
>>
Perl
>>
How to convert a binary value to decimal
sub bintodec { unpack("N", pack("B32", substr("0" x 32 . shift, -32))); } $dec = bintodec("10001111"); print $dec;
Please enable JavaScript to view the
comments powered by Disqus.