Is there a way to convert a Binary String meaning "101101011" into a Binary 101101011?
If it is by using Bitwise Manipulation, please point out the tutorial for bitwise operator in the PHP manual since i cannot find it.
What is got is a binary_string that is say "11111111", what i really want to do is add "00010000" from that binary_string and return the new binary_string.
Anyone know how to do this?
Thank you in advance
Regards
Mian
How to convert Binary_String into true Binary
Moderator: General Moderators
There is also the [php_man]bindec[/php_man]() and [php_man]decbin[/php_man]() functions worth looking at...
Code: Select all
$bin_str = '11111111';
$add = '00010000';
echo decbin(bindec($bin_str) + bindec($add)); // 100001111