Bitwise operators. Differences from javascript and PHP.

skorobogatov at gmail.com skorobogatov at gmail.com
Fri Nov 17 10:41:16 CET 2006


I can't understand a little thing in bitwise operations.


In PHP and Javascript
4653896912>>13 = -212992

In Python and Ruby
4653896912>>13 = 568102

In Python and Ruby - it's ok. I understand.
But i need to get in Python same value as in PHP and Javascript.
How can i do this?




More information about the Python-list mailing list