Shift Operators: >> and <<
expression << expression expression >> expression
The bitwise shift operators are:

Right shift (>>)

Left shift (<<)
These binary operators have lefttoright associativity.
Both operands of the shift operators must be of integral types. Integral promotions are performed according to the rules described in Integral Promotions. The type of the result is the same as the type of the left operand. The value of a rightshift expression e1 >> e2 is e1 / 2e2, and the value of a leftshift expression e1 << e2 is e1 * 2e2.
The results are undefined if the right operand of a shift expression is negative or if the right operand is greater than or equal to the number of bits in the (promoted) left operand.
The left shift operator causes the bit pattern in the first operand to be shifted left the number of bits specified by the second operand. Bits vacated by the shift operation are zerofilled. This is a logical shift, as opposed to a shiftandrotate operation.
The right shift operator causes the bit pattern in the first operand to be shifted right the number of bits specified by the second operand. Bits vacated by the shift operation are zerofilled for unsigned quantities. For signed quantities, the sign bit is propagated into the vacated bit positions. The shift is a logical shift if the left operand is an unsigned quantity; otherwise, it is an arithmetic shift.
Microsoft Specific
The result of a right shift of a signed negative quantity is implementation dependent. Although Microsoft C++ propagates the mostsignificant bit to fill vacated bit positions, there is no guarantee that other implementations will do likewise.