I'm currently reading a book on programming. An example gives me a (correct me if I'm wrong) series: $$ X + \frac{X}{2} + \frac{X}{4} + \frac{X}{8} + \dotsb + 1 $$ The answer given is roughly: $2X$
It's been a while since I've touched any type of calculus so I have no clue where to start.
Hi Toboggan and welcome to MSE. As it has been said in the comments, what you wrote looks like a geometric series. I assume that what you are trying to compute is $$1+\sum_{i=0}^{\infty}\frac{X}{2^i}$$ for $X\neq 0$ (otherwise it is trivial).
The idea of how to compute it relies on the following facts: