I'm having trouble understanding the notation used in a linear algebra exercise (it's exercise 2.33 of Nielsen and Chuang's "Quantum Computation and Quantum Information", page 74).
The exercise gives the Hadamard matrix
$$H = \frac{1}{\sqrt{2}} \Bigl[ (|0\rangle + |1\rangle)\langle 0| + (|0\rangle - |1\rangle)\langle 1| \Bigr]$$
and asks us to show that
$$H^{\otimes n} = \frac{1}{\sqrt{2^n}} \sum_{x,y} (-1)^{x \cdot y} |x \rangle \langle y|$$
My understanding is that $x$ and $y$ in the sum run through the basis vectors for the tensor product space, but my problem is that I don't understand what they're supposed to mean in the exponent of $(-1)$.
I thought I was supposed to interpret them in base $2$ ("$00$" as $0$, "$10$" as $2$, etc.), but then then the formula doesn't seem to work. For example, taking $n=2$ and computing the tensor product using the matrix representation of $H$:
$$H^{\otimes 2} = H \otimes H = \frac{1}{2} \left[ \begin{array}{rr} 1 \left[ \begin{array}{rr} 1&1 \\ 1&-1 \end{array} \right] & 1 \left[ \begin{array}{rr} 1&1 \\ 1&-1 \end{array} \right] \\ 1 \left[ \begin{array}{rr} 1&1 \\ 1&-1 \end{array} \right] & -1 \left[ \begin{array}{rr} 1&1 \\ 1&-1 \end{array} \right] \end{array} \right] = \frac{1}{2} \left[ \begin{array}{rrrr} 1 & 1 & 1 & 1 \\ 1 & -1 & 1 & -1 \\ 1 & 1 & -1 & -1 \\ 1 & -1 & -1 & 1 \end{array} \right]$$
But, from the formula given in the book (and my probably mistaken interpretation of $x$ and $y$), the coefficient at, say, $|10 \rangle \langle 10|$ should be $(-1)^{2 \cdot 2} = 1$, but the corresponding coefficient in the matrix is $-1$.
I feel I'm being dumb and missing something very simple, but I can't see it. What am I doing wrong?