how to find the binary expansion of any number in the unit interval [0,1] For each integer $n\geq 1$ and $x\in [0,1]$, define $f_n(x)=x_n$ where $x_n$ is the $n$th binary digit of x. If x is a number with two binary expansions, use the expansion that ends with infinitely many zeroes. Draw the graphs of the first three members of the sequence  $\{f_n-1/2\}$.
In fact I don't know how to represent the binary expansion of any number in the unit interval [0,1]. Thanks! 

You can get the binary expansion using the floor function as part of an algorithm that uses theory surrounding the limit,
$\tag 1 \quad a = {\displaystyle \lim _{n \to +\infty} \frac{ \lfloor a 2^n \rfloor}{2^n}},\; \text{ for any } a \in \Bbb R$
EXAMPLE: Write $\frac{3}{14}$ as a binary expansion.
$\text{floor}: \lfloor \frac{3}{14} \rfloor =  0$
$2^{-1}\;\,: \lfloor 2 \times \frac{3}{14} \rfloor = \lfloor 0+\frac{3}{7} \rfloor = 0$
$2^{-2}\;\,: \lfloor 2 \times \frac{3}{7} \rfloor = \lfloor 0 + \frac{6}{7} \rfloor = 0$
$2^{-3}\;\,: \lfloor 2 \times  \frac{6}{7} \rfloor = \lfloor 1 + \frac{5}{7} \rfloor = 1$
$2^{-4}\;\,: \lfloor 2 \times  \frac{5}{7} \rfloor = \lfloor 1 + \frac{3}{7} \rfloor = 1$
Since the $2^{-5}$-calculation with input $\frac{3}{7}$ can be looped back to the $2^{-2}$-calculation, we can write
$\quad \frac{3}{14} = {0.0\overline{011}}_{\; base=2}$
