(i & 1) evaluates to 1 if the least significant bit of i is 1, and to 0 otherwise. The thing here is that a number is odd if-f its least significant bit is 1. Think about it...
A binary number looks like this:
... dn ... d2 d1 d0, where dk are the individual digits, each being either one or zero.
The value of this number is:
... + 2n * dn + ... + 22 * d2 + 21 * d1 + 20 * d0
As you can see, in the above sum, every term other than 20 * d0 is always even.
Thus, if d0 is 0 the number is even and if d0 is 1 the number is odd.
If you look at numbers in binary form you will notice that the least significant column alternates between 0 and 1. So all even numbers end in 0 and all odd numbers end in 1 in binary.