7 Expressions [expr]

7.6 Compound expressions [expr.compound]

7.6.7 Shift operators [expr.shift]

The shift operators << and >> group left-to-right.
shift-expression:
	additive-expression
	shift-expression << additive-expression
	shift-expression >> additive-expression
The operands shall be of integral or unscoped enumeration type and integral promotions are performed.
The type of the result is that of the promoted left operand.
The behavior is undefined if the right operand is negative, or greater than or equal to the width of the promoted left operand.
The value of E1 << E2 is the unique value congruent to modulo , where N is the width of the type of the result.
Note
:
E1 is left-shifted E2 bit positions; vacated bits are zero-filled.
— end note
 ]
The value of E1 >> E2 is , rounded down.
Note
:
E1 is right-shifted E2 bit positions.
Right-shift on signed integral types is an arithmetic right shift, which performs sign-extension.
— end note
 ]
The expression E1 is sequenced before the expression E2.