Strange Right-Shift Problem
| From: | Michael Gross | Date: | Thu, 29 Dec 2005 23:37:57 +0000 |
| Subject: | Strange Right-Shift Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-227993@lists.php.net to get a copy of this message | ||
Hello
I have to migrate a PHP-application to a new Linux-Box. Both the old and the new system are Linux and PHP 5.1.1. (the old one has a Pentium 4, the new one two Xeon CPUs). I have a problem using the Crypt_Xtea-Extension. I narrowed it down to the following right-shift operation:
(-3281063054 >> 11) produces different results:
Old System: 495070
New System: -1048576
I understand that both results are "wrong", but everything worked with the old behavior and I need that behavior back very urgent.
Maybe someone can explain me in which way the bits are shifted so that the result is 495070? If I understand it, I implement my "own" shift function.
thanks a lot
Michael Gross