decbin():Binary equivalent of decimal number

string decbin(int $number);
ParameterDESCRIPTION
$numberRequired : Decimal number as Input to convert to equivalent binary number.
The output is string converted to binary base system.

Example : Decimal to Binary

<?Php
echo decbin(3); // Output 11 
echo "<br>";
echo decbin(35); // Output 100011 
echo "<br>";
echo decbin(100); // Output is 1100100
echo "<br>";
echo decbin(258); // Output is 100000010
echo "<br>";
echo decbin(1000); // Output is 1111101000
echo "<br>";
?>

Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com




    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-2023 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer