(n & 1) will check if 'n' is odd or even, this is similar to (n%2).
In case 'n' is odd (n & 1) will return true/1;
Else it will return back false/0;
The '>>' in (n>>=1) is a bitwise operator called "Right shift", this operator will modify the value of 'n', the formula is:
(n >>= m) => (n = n>>m) => (n = n/2^m)
Go through GeeksforGeek's article on "Bitwise Operator's", recommended!