That doesn't work:
>perl -le "print(unpack('%32b*', 0x13))" 7
There are 3 bits set in 0x13, not 7.
Sorry, my mistake.
>perl -le "print(unpack('%32b*', chr(0x13)))" 3
In reply to Re^2: counting set bits in binary file
by ikegami
in thread counting set bits in binary file
by dwhite20899
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |