string decbin(int $number);
Parameter | DESCRIPTION |
$number | Required : 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