When a number is equal to even the largest bit in its binary representation, this 0. Dividing the number by 2 removes this zero.
N = 16 => 8 => 4 => 2 => 1
(10000)2 => (1000)2 => (100)2 => (10)2 => 1
, 1. , . 1 0. , , 2, .
, , 1 s:
1111111111111
, , , 1
1111111111111 decrement it because it is odd
1111111111110 divide it by two because it even
111111111111
, 1 2 * 1s. 1s log 2 N. , O (logN).