Re: [Zend Engine 2] Right/Left Shift Zero Fill operator

From: Date: Wed, 12 Sep 2001 16:16:05 +0000
Subject: Re: [Zend Engine 2] Right/Left Shift Zero Fill operator
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-65834@lists.php.net to get a copy of this message
At 12:15 AM 9/11/2001 +0200, Alexander Wirtz wrote:
Hi Jeroen, to give a little bit background, as a student of computersciences I happen to work with bitshift not as a means of having a "quick" multiplication or division, but as using it to "manipulate" bit-patterns. The distinction between signed and unsigned rightshift is nothing strange, obscure or redundant, but is implemented down to the machine-language itsself (dependent on cpu-architecture). So this is no "bad operator", but one of the most crucial operators on bit-patterns. I don't want to sound arrogant (saying this is almost always a sure sign, that it will ;-) ) but maybe you should inform yourself the next time why other languages have this operator implemented. Disabling signed shifting will force me to turn back to perl, as I use this feature for quick hacking certain scripts I use at the University (and that would be a very cruel thing to do :o) ) - besides, it would disregard the "holy BC"...
In what case (when not dividing) do you use this kind of shift? Andi
Cheers & flames on (constructive comments are welcome), Alexander --
| Alexander Wirtz           | eMail: wirtz@web-active.com              |
| web@ctive GmbH            |     "Accidents, Emergency, Ambulance"    |


« previous php.dev (#65834) next »