Let $g(x,n)$ be a function which chops off the first n digits of the binary decimal expansion of x.
eg $g(0.1010111,2)=0.10111$
Is there a function $f(x)$ from the reals to the reals, such that for all positive integers n, and real numbers $x$, given only the value of $c$, where $c=g(f(x),n)$, there is an algorithm to find $x$?
Is there an algorithm, given both $n$ and $c$, to find $x$?
Yes.
First encode the binary representation of $x$ so it is a number in $[0,1)$, then create a infinite number of copies of this in another number in $[0,1)$.
To decode, find one of the untruncated copy and then decode back to the original real.
So for example, for the first step take the first bit to represent the sign and then use the even bits to hold the integer bits of $x$ in reverse (using $0$s when you run out) and the other odd bits to hold the fractional bits of $x$. Call this $y$.
For the second part, put the bits of $y$ at positions $p^1, p^2,p^3,\ldots$ for all primes $p$ and fill the non-prime-powers with $0$. Call this $z=f(x)$.
To decode $g(z,n)$, chose any particular prime $p>n$ and look at the bits $p^1, p^2,p^3,\ldots$. This gives you $y$. Then reverse the first step.