# To understand the notation of $| a, a \oplus b \rangle$

This must be trivial but I can't find a clear explanation of the notation of $$| a, a \oplus b \rangle$$.

It is the resulting state after applying a CNOT gate to $$|a,b\rangle$$: $$\rm{CNOT}|a,b\rangle = | a, a \oplus b \rangle$$.

Is it correct that $$| a, a \oplus b \rangle = | a\rangle \otimes |a \oplus b \rangle$$?

Suppose that $$|a\rangle=a_1 |0\rangle + a_2 |1\rangle$$, and $$|b\rangle=b_1 |0\rangle + b_2 |1\rangle$$, then $$|a \oplus b \rangle = ?$$

I know that $$\rm{CNOT}|a,b\rangle=a_1 |0\rangle \otimes |b\rangle + a_2 |1\rangle \otimes (b_2 |0\rangle + b_1 |1\rangle)$$. Then how to go from here to $$| a, a \oplus b \rangle$$?

As you correctly wrote $$|a,a\oplus b\rangle:=|a\rangle\otimes|a\oplus b\rangle$$ where $$a$$ as well as $$a\oplus b$$ are either $$0$$ or $$1$$. The reason for the latter is that the logic symbol $$\oplus$$ stands for "exclusive or" so it acts on $$\{0,1\}^2$$ via $$0\oplus 0:=0=:1\oplus 1$$ and $$0\oplus 1:=1=:1\oplus 0$$. Thus given any two vectors $$\psi,\phi\in\mathbb C^2$$ the expression $$|\psi\oplus\phi\rangle$$ has no inherent meaning.
The reason one defines $${\rm CNOT}|a,b\rangle:=|a,a\oplus b\rangle$$ for $$a,b\in\{0,1\}$$ first is of course that it can be extended from basis states $$|0,0\rangle,|0,1\rangle,\ldots$$ to all of $$\mathbb C^2\otimes\mathbb C^2$$ via linearity: \begin{align*} {\rm CNOT}(|\psi\rangle\otimes|\phi\rangle)&=\langle 0|\psi\rangle \langle 0|\phi\rangle{\rm CNOT}|0,0\rangle+\langle 0|\psi\rangle \langle 1|\phi\rangle{\rm CNOT}|0,1\rangle+\ldots\\ &=\langle 0|\psi\rangle \langle 0|\phi\rangle|0,0\rangle+\langle 0|\psi\rangle \langle 1|\phi\rangle|0,1\rangle+ \langle 1|\psi\rangle \langle 0|\phi\rangle|1,1\rangle+\langle 1|\psi\rangle \langle 1|\phi\rangle|1,0\rangle \end{align*}