note 88511 deleted from language.operators.bitwise by thiago
| From: | thiago@php.net | Date: | Tue, 27 Jan 2009 16:28:08 +0000 |
| Subject: | note 88511 deleted from language.operators.bitwise by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149851@lists.php.net to get a copy of this message | ||
Note Submitter: Ben Davies
----
I really hate this description:
$a << $b Shift left Shift the bits of $a $b steps to the left (each step means
"multiply by two")
$a >> $b Shift right Shift the bits of $a $b steps to the right (each step means
"divide by two"
I prefer:
syntax description result
$a << $b Shift left $a = $a * 2^$b
$a >> $b Shift right $a = $a / 2^$b
In my example, "^" means "to the power of", not Xor.