C++ Syntax: shift: << >>

Description

The shift operators bitwise shift the value on their left by the number of bits on their right:- So
2 << 4
is 32 and
-8 >> 3
is -1.

See operator precedence

Other Uses for << >>

<< and >> are reused (i.e. overloaded) as the input/output operators.

Usage Notes

None.
Go Back to the The C++ Crib Top Page


If you have any comments about this page please send them to Nick West