How to prove that $2^0 + 2^1 + 2^2 + 2^3 + \cdots + 2^n = 2^{n+1} - 1$ When I'm reading Computer Systems: A Programmer's Perspective, I met the sum of binary numbers and failed to prove it:
$$ 2^0 + 2^1 + 2^2 + 2^3 + \cdots + 2^n = 2^{n+1} - 1 $$
This might be preliminary knowledge, I'm not good at mathematics, any body could give me a hint?

You are going to walk a distance of one mile. You walk half the distance and rest. You then walk half the remaining distance and rest. Continue doing this.
So now we can write down everyone's favorite infinite series,
$\frac{1}{2} +\frac{1}{4} +\frac{1}{8} +\frac{1}{16} + \dots  = 1$
Multiply both sides by by $2^{n+1}$,
$2^{n} + 2^{n-1} + 2^{n-2} +...+2^2+2^1+2^0+\frac{1}{2} +\frac{1}{4} +\frac{1}{8} +\dots = 2^{n+1}$.
OR
$2^{n} + 2^{n-1} + 2^{n-2} +...+2^2+2^1+2^0+1 = 2^{n+1}$.
Subtracting $1$ from each side,
$2^{n} + 2^{n-1} + 2^{n-2} +...+2^2+2^1+2^0 = 2^{n+1}-1$.
