bindec():Decimal equivalent of Binary string

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.

Example : Binary to Decimal

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>"; 


* indicates required
Subscribe to plus2net

    Post your comments , suggestion , error , requirements etc here .

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