# Simon's algorithm -- circuit for given s

I'm currently learning Simon's algorithm, from IBM Quantum Experiene. For the given string $$s=11$$, they display the implemented function $$Q_f$$ like this:

Can someone explain to me, why the CNOT gates are arranged like this, for $$s=11$$? The way I see it, the outcome of the the qubits below, should be $$f(x \oplus 11)$$, but we still don't know about the implementation of $$f$$, just because we know $$s$$, if I'm not wrong. So how can we display $$Q_f$$ here?

Remember that we're not told what function $$f$$ is being implemented by this circuit, it is simply claimed that $$f(x)=f(y)$$ if and only if $$y=x$$ or $$x\oplus 11=\bar{x}$$. So, we need to identify what the function is, and then we can verify if it has that property.
so, if the bit values of the first register are $$x$$ and $$y$$, we compute $$0\oplus x=x$$ with the first controlled not, and $$x\oplus y$$ with the second. Now we can make a truth table for the function. If the two inputs are the same, the output is 0. If the two outputs are different, the outputs are 1. So, in both cases, the two inputs that give the same output are related to each other by $$\oplus 11$$, as required.