I'm trying to understand how bit shift works. Can someone please explain the meaning of this line:
while ((n&1)==0) n >>= 1;
Run Code Online (Sandbox Code Playgroud)
where n is an integer and give me an example of a n when the shift is executed.