What is the measure of the set $\left\{\frac{1}{2}\right\}\cup\left\{\frac{1}{4},\frac{3}{4}\right\}\cup\cdots$? Consider the set $S=\left\{\frac{1}{2}\right\}\cup\left\{\frac{1}{4},\frac{3}{4}\right\}\cup\left\{\frac{1}{8},\frac{3}{8},\frac{5}{8},\frac{7}{8}\right\}\cup\cdots$.
This set can be created by iteratively taking out the midpoints from a set of line segments (Sketch). Firstly one takes out the midpoint of the interval $(0,1)$, leaving two line segments: $\left(0,\frac{1}{2}\right)\cup\left(\frac{1}{2},1\right)$， then takes out the midpoints $\left\{\frac{1}{4},\frac{3}{4}\right\}$  of this two intervals, leaving line segments: $\left(0,\frac{1}{4}\right)\cup\left(\frac{1}{4},\frac{1}{2}\right)\cup\left(\frac{1}{2},\frac{3}{4}\right)\cup\left(\frac{3}{4},1\right)$... This process is continued ad infinitum because one just takes out finite points each time.
And after each time the remaining part is a countable uion of intervals so it is a measurable set, e.g. after the nth step there are $2^n$ intervals with the measure $\frac{1}{2^n}$, hence the measure of the set left is always $1$ .The original set $(0,1)$ has the measure $1$, so the measure of $S$ is $1-1=0$.
On other hand, the elements in $S$ can be writen in binary form $S=\left\{0.1_2\right\}\cup\left\{0.01_2,0.11_2\right\}\cup\left\{0.001_2,0.011_2,0.101_2,0.111_2\right\}\cup\cdots$. So $S$ is the set of all the binary number in interval $(0,1)$, that is $S=(0,1)$. So the measure of $S$ is $1$.
So what is the measure of $S$?

Update
Why I think $S=(0,1)$ is because one can write $S$ in this form:
$$
S=\bigcup_{n=1}^{\infty}S_n
\\
S_n=\{x|x=(0.a_1\cdots a_{n-1}1)_2=\frac{1}{2^n}+\sum_{k=1}^{n-1}a_k2^{-k},a_k=0\ \mathrm{or}\ 1\}
$$
and I think the infinite binary decimal like $\frac{1}{3}$ is belong to the subset $S_{\infty}$.
Also I want the Lebesgue measure of $S$.
 A: Simply, since
$$
S\subset\Bbb Q\;,
$$
calling $\mu$ the Lebesgue measure, you get
$$
0\le\mu(S)\le\mu(\Bbb Q)=0\;.
$$
A: I have a little difficulty understanding if you are talking about $$S = \left\{\frac12,\frac14,\frac34,\frac18,\frac38, \frac58,\ldots\right\}$$ or about its complement $$\bar S = [0,1] \setminus S$$ or if I have misunderstood completely.
Every element of $S$ is a rational number.  $S$ is therefore a subset of $\Bbb Q$, and must be countable, because $\Bbb Q$ is countable. (Another way to see this is that $S$ is clearly a union of a countable famiyy of finite sets.  Such unions are always countable.)  Therefore, the measure of $S$ is $0$ and the measure of $\bar S$ is 1.
$S$ is not the set “of all the binary number in interval”.  It's the set of numbers whose binary expansion terminates.  That is important!  It omits $\frac13= 0._201010101\ldots$ for example.  This should be clear: every element of $S$ is a rational number whose denominator is a power of $2$.  The denominator of $\frac13$ is $3$, which is not a power of $2$.
A: $S$ only contains numbers with finite binary expansion. $\frac13$ is not there. The irrational numbers are not there. So the Lebesgue measure is $0$.
A: The mistake is at where you think $S$ $= (0,1)$. For example, ${\pi \over 5}$ is not a rational number.
A: Rule of thumb: if you can associate to each element of your set a different natural number, then your set has measure 0.
In your case, associate to each element its non-integer part in binary and translate in decimal. (for example $0.1101_2 \to 1101_2 \to 13$)
A: Arthur's answer covers it, but another way of looking at it is that you've deleted only an infinite sequence of points, i.e. a countably infinite set, and thus a set of measure $0.$
