the >> operator does bitwise right shift (and the << operator does left). For example, let x be a 8 bit variable with the following value

x = 00101100

then, after executing this piece of C (and C++) code

x << 1;

the value of x is:

x = 01011000

this operation (<<) can also be seen as a fast method of calculate some products since

b = a << 1; is equivalent to b = a * 2;

b = a << 2; is equivalent to b = a * 4;

and so on, IF WE CONSIDER THAT THERE ARE NO OVERFLOW PROBLEMS (1s going out of the variable by the "left side").

The & operator is the bitwise AND operator. After the following C statement

c = a & b;

the i-th bit of c is active (1) if the i-th bit of a is active AND the i-th bit of b is active. For example, let a and b be two 8 bit variables with the following values

a = 01010101

b = 00001111

-------------

a & b = 00000101

And 0x1f is an hexadecimal number. In C, when you prefix a number with 0x, you mean the number is in hexadecimal format. 0x1f is just 31 in decimal format.

Sorry for my bad english. I hope I have help you ... a bit