[Solved] What does “>>” and “


<< and >> are the Binary Left Shift and Binary Right Shift respectively.

The left operands value is moved left by the number of bits specified by the right operand.

Example, Code: temp = 14 << 2
The variable temp has a value of 56 because 14 (00001110 in binary) shifted left two bits equals 56 (00111000 in binary).

The left operands value is moved right by the number of bits specified by the right operand.

Example, Code: temp = -14 >> 2
temp has a value of -4: -14 (11110010 in two's complement binary) shifted right two bits equals -4 (11111100 in two's complement binary).

solved What does “>>” and “<<" means in python? [duplicate]