This is part of Simon Algorithm (Initial state + some Oracle function) There is a post that explains how to interpret circuits (How to interpret a quantum circuit as a matrix?), but I'm not sure how to apply to the following circuit.
The first part, both Hadamard to first and second qubit:
$M_1 = H \otimes H \otimes I \otimes I$
Then, first Controlled NOT:
How can I apply a matrix to the first and second qubit if I have $M_1$ that is a 16x16 matrix. I know I could have applied $H$ to the first qubit and then do a tensor product with $I$ (third qubit), and the result, multiply by $CX$. But then I have the second $CX$ which is applied to the first qubit and 4th qubit.
Symbol $\otimes$ is a tensor product.