Base 10 to 2 generating function?

47 Views Asked by At

I’m working in Desmos on a larger project that involves base conversion. I managed to come up with this function that gets the job done but I’m wondering if there’s a simpler way to do things (in a form I can write out in Desmos), or if this is the simplest way. Thanks.

$$C(x)=\sum_{n=0}^{\lfloor \log_2x \rfloor} 10^n \cdot \left(\Big\lfloor \frac {x}{2^n} \Big\rfloor \bmod2\right)$$