Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Decimal to Binary, Hexadecimal and Octal conversion

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 103
    Comment on it

    Decimal to Binary conversion

    To convert decimal to binary conversion a function decbin() is used. Syntax:

    decbin(number);
    

    Example:

    <?php
    echo decbin("43") ;//specify the decimal that is need to convert
    ?>
    

    Decimal to Hexadecimal conversion

    To convert decimal to hexadecimal conversion a function dechex() is used. Syntax:

    dechex(number);
    

    Example:

    <?php
    echo dechex("43") ;//specify the decimal that is need to convert
    ?>
    

    Decimal to Octal conversion

    To convert decimal to octal conversion a function decoct() is used. Syntax:

    decoct(number);
    

    Example:

    <?php
    echo decoct("15") ;//specify the decimal that is need to convert
    ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: