# Find smallest \$N\$ such that \$x/2^Nin[0,1]\$ (in python)

Assume $$x≥0$$. Find smallest $$N$$ such that $$x/2^Nin[0,1]$$

I want to write a while loop which gives me the smallest $$N$$ such that $$x/2^N$$ is in the interval $$[0,1]$$