Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

convert binary number to decimal

Mon Oct 27, 2008 12:27 pm

Code:
<?php
$orig_dec
= 66251125;
$dec2bin = decbin($orig_dec);
$bin2dec = bindec($dec2bin);

echo
"original decimal number: $orig_dec <br>";
echo
"new binary number: $dec2bin <br>";
echo
"back to decimal: $bin2dec <br>";
?>




Post a reply
  Related Posts  to : convert binary number to decimal
 convert decimal number to octal number     -  
 convert octal number to decimal number     -  
 convert to binary number     -  
 conversion from binary to decimal numbers as string     -  
 convert hexadecimal to decimal     -  
 convert integer number to octal,hexadecimal number systems     -  
 convert string into binary     -  
 Scale double number using big decimal     -  
 convert char*(number) to required unsigned char*     -  
 add sequence of decimal numbers     -  

Topic Tags

PHP Variables