<< is the binary shift operator

arg1 & 1 << x

gives

arg1 & (1 << x)

(1 << x) means shift 1 (Binary 00000001) to the left by x positions.

in effect, you are anding arg1 by

00000001 SHL 7 = 10000000 when x=7

00000001 SHL 6 = 10000000 when x=6

...

00000001 SHL 0 = 10000000 when x=0

to get the desired output.

Hope that helps,

...Snehanshu