I have no idea how to prove this. Can someone help?

Given a real number x, denote by [x] the largest integer less than or equal to x. Prove that the function defined

$\displaystyle f(x)$ =$\displaystyle \sum_{n = 0}^{\infty}\frac{nx-[nx]}{2^n}$ is Riemann integrable on any interval [a,b]. Then compute

$\displaystyle \int_0^1 f(x)dx$