Hi

This is the solution of the winner of the contest. I'm having trouble understanding this. Can someone explain how is this working ?

```
int findComplement(int num) {
long long limit = 2;
long long numl = num;
for (; limit <= numl; limit *= 2);
long long ans = limit - 1 - numl;
return ans;
}
```