Online Octal To Binary Convert Tool




About Octal To Binary (A free online tool to converts octal to binary)

Octal to Binary tool convert octal string to binary string. Many times we wants to convert octal to binary that time we can use PHP provides inbuilt functions octdec() and decbin(). We have to use two functions that we can convert octal number to binary.Many developers and programmers are using this tools in daily life.

Syntax:
base_convert($string,8,2);

For Example:

There are two ways to convert a octal number to an binary number using built-in functions:

First Way:

Use octdec to convert the octal number to decimal, and then use decbin to convert the numeric decimal value to an binary string:

$octString = "72";
$binNumeric = octdec($octString);
$binString = decbin($binNumeric); // = "111010"

Second Way:

Use base_convert to convert the octal number directly to an binary number:

$octString = "76";
$binString = base_convert($octString,8,2); // = "111110"