bindec():Decimal equivalent of Binary string

echo bindec('1101'); // Output 13 
echo "<br>";
echo bindec('0101'); // Output 5 
echo "<br>";
echo bindec('10110'); // Output is 22
echo "<br>";
echo bindec('101101101'); // Output is 365
echo "<br>";
echo bindec('111011100'); // Output is 476
echo "<br>"; 
number bindec(string $binary);
$binaryRequired : Binary number as Input string representing number to convert to equivalent decimal number.
The output is number converted to decimal base system.
Warning The input $binary must be a string. Using other data types will produce unexpected results.

Math Functions base_convert(): Convert number From any base to other
decbin() Binary equivalent of decimal number
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 All rights reserved worldwide Privacy Policy Disclaimer