x<<y means 'x multiplied by 2 raised to the power y'.

<< is the bitwise shift operator

suppose a number 'x' in binary looks like this

00000110

Then x<<1 is 00001100 and x<<2 is 00011000.

<< is the bitwise shift operator

suppose a number 'x' in binary looks like this

00000110

Then x<<1 is 00001100 and x<<2 is 00011000.

Last edited on

Topic archived. No new replies allowed.