How does the circuit work?