Binary Shift: Signed or Unsigned?
| From: | Alex Stapleton | Date: | Fri, 25 Jun 2004 17:24:59 +0000 |
| Subject: | Binary Shift: Signed or Unsigned? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-10776@lists.php.net to get a copy of this message | ||
Are << and >> signed or not? E.g.
is 1100 >> 1 = 1110 or 0110?
I am using PHP5, if I want unsigned binary shift, do i have any
options other than converting to a string using base_convert and
writing my own function to shift the bits and then convert back to a
number?
Is what i am after planned if not availible already?