Hello,

I have two binary numbers which are quite long.  128 bits to be exact.

When converting the two items to decimal i get the same result.  The
binary numbers are quite different, so I am not getting the expected
results.

Here is my code:

$b1 = 
'00100000000000010000110110111000100001011010001100000000000000001111111111111111111111111111111111111111111111111111111111111111';
$b2 = 
'00100000000000010000110110111000100001011010001100000000000000000000000000000000000000000000000000000000000000000000000000000000';

$dec1 = bindec($b1);
$dec2 = bindec($b2);

echo $dec1."\n";
echo $dec2;

I get 4.2540766452641E+37 for both $dec1 and $dec2.

What can I do to resolve the problem?

Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to