Forgive me if my math is askew, but doesn't the negative imply the number is signed? If I remember from my C++ days, a declaration of:
unsigned int blah; Meant you could not store negative numbers in that variable. Hence, negatives would be signed. No? On Tue, 2004-06-08 at 12:52, René Fournier wrote: > $dec = -333371788; > echo $dec."\n"; > > $hex = dechex($dec)."\n"; > $dec2 = hexdec($hex)."\n"; > > echo $dec2."\n"; > > -= PRODUCES: =- > > -333371788 > 3961595508 > > > Is this something about signed versus unsigned integers? What I really > would like to do is convert that negative number (-333371788), which I > suppose is unsigned to a signed integer (3961595508) without having to > convert it to hex, then back to decimal. > > ....Rene -- Adam Voigt [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php