I agree. But the << and >> are pretty high language so no performance gains. Although for visualing it actually would be very helpful. Why you just multiplied by 2 when you wanted to shift every bit to the left seems odd. Anybody who doesn't grasp this feature of binary would be kinda freaked out.

I want *ALL* bitwise operations in $calc.

I tried $calc($1 & 7) once and got driven nuts.

//echo ... $calc(34 & 7)

I bugchecked for twenty minutes. I never doubted basic functions would be missing from $calc. And it worked for everything below 7. Took a while to find out you can't do a bitwise and, and how the heck you do a bitwise and.

I searched and searched, and finally came across $and()

What a joke! Add the stupid bitwise operators into calc. Not just << and >>... All of them.

^ is typically used for xor and used as power in $calc so something has to be done. Typically ** is the power function in other languages that have it natively. Because of backwards compatabilly making ^ into xor wouldn't be doable.

Nevertheless, $calc needs ALL bitwise operations!