How to use summation to get the value of a binary number?

I want to do this: 

$(x\_{n}x\_{n-1}...x\_{0})=\sum\_{i=0}^{n}x\_{i}\cdot b^{i} $

But it seems that I can only do something like this:

$\sum\_{i=1}^{10}i^{2}$

I imagine that there is some indexation function which will help to do so, I also know how to do in another way, but is it possible to do this using summation?