I want to find a formula that shows the number of $k$-dimensional faces of an $n$-dimensional cube. By internet I found that this formula has a generating function, $(x+2)^n$, where the formula is the coefficient of $x^k$. However, I still don't understand why this method works. Any explanation?
Edit: Now I need to find its number of inner diagonals and number of hyperplanes of symmetries. Inner diagonals are between vertices that are symmetric to each other with respect to the centre of the cube. I think each vertex has only one centre-symmetric vertex so the number of inner diagonals is $2^{n-1}$, namely half of the vertice number. What does "hyperplanes of symmetries" mean?