Proving $\int_0^1 \frac{\mathrm{d}x}{1-\lfloor \log_2(1-x)\rfloor} = 2 \log 2 - 1$.

Start by noting that $\lfloor\log_2(1-x)\rfloor = -(n+1)$ for all $x \in (1-2^{-n},1-2^{-(n+1)})$.

Therefore, $\displaystyle\int_0^1 \dfrac{\,dx}{1-\lfloor \log_2(1-x)\rfloor} = \sum_{n = 0}^{\infty}\int_{1-2^{-n}}^{1-2^{-(n+1)}} \dfrac{\,dx}{1-\lfloor \log_2(1-x)\rfloor}$

$= \displaystyle\sum_{n = 0}^{\infty}\int_{1-2^{-n}}^{1-2^{-(n+1)}} \dfrac{\,dx}{1+(n+1)} = \sum_{n = 0}^{\infty}\dfrac{2^{-(n+1)}}{n+2}$.

To evaluate this summation, start with the geometric series $\dfrac{x}{1-x} = \displaystyle\sum_{n = 0}^{\infty}x^{n+1}$.

Integrate both sides to get $-x-\ln(1-x) = \displaystyle\sum_{n = 0}^{\infty}\dfrac{x^{n+2}}{n+2}$.

Divide both sides by $x$ to get $-1-\dfrac{\ln(1-x)}{x} = \displaystyle\sum_{n = 0}^{\infty}\dfrac{x^{n+1}}{n+2}$.

Then, plug in $x = \dfrac{1}{2}$ to get $\displaystyle\sum_{n = 0}^{\infty}\dfrac{2^{-(n+1)}}{n+2} = -1-\dfrac{\ln(1-\tfrac{1}{2})}{\tfrac{1}{2}} = 2\ln 2 - 1$.


This is the same as the integral with $1-x$ replaced by $x$, and this answer really solves the $x$ version of the integral.

In the interval $(2^{-(n+1)},2^{-n})$ this function takes the value ${1}{1+n+1} = \frac{1}{n+2}$. So this integral is: $$\sum_{n=0}^\infty \frac{1}{2^{n+1}} \frac{1}{n+2}$$

The general sum: $$\sum_{n=0}^\infty \frac {x^{n+1}}{n+2}$$ has a closed form that is not hard to figure out. Wolfram Alpha [*] gets $$-1-\frac{\log(1-x)}{x}$$ which, when $x=1/2$ agrees with your answer.

[*] I actually had to ask WA for $\sum \frac{x^{n-2}}{n+2}$, and then divided by $x$.


A related technique. Here is an approach. Let's make the change of variables $\log_2(1-x)=-u$ which results in the integral

$$ I = \int_0^1 \frac{{d}x}{1-\lfloor \log_2(1-x)\rfloor} = \int_0^{\infty} \frac{2^{-u}{d}u}{1-\lfloor -u\rfloor} =\ln(2)\sum_{k=0}^{\infty}\int_k^{k+1}\frac{2^{-u}{d}u}{1-(-k-1)} $$

$$ = \ln(2)\sum_{k=0}^{\infty}\frac{1}{k+2}\int_k^{k+1}{2^{-u}{d}u}= \sum_{k=0}^{\infty}\frac{2^{-k-1}}{k+2}=2\ln(2)-1. $$

Note:

$$ \lfloor -u \rfloor = -k-1 \quad \mathrm{if} \quad -k-1 \leq -u <-k. $$