Good stuff, thanks a lot.
However, the line $hex = sprintf... better works as follows:
$hex = sprintf('%0' . $WIDTH * 2 / 8 . 'X', oct("0b$cut_string")) . $h +ex;
This covers cases when there are long sequences of zeroes in binary strings.
In reply to Re^4: How to convert binary to hexadecimal
by Anonymous Monk
in thread How to convert binary to hexadecimal
by vaas_m
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |