The mind is an evolved computer program.
Meaning comes from the correspondence between the code and its execution, and the compact underlying structure of the world and its dynamics.
Thought, then, is the execution of this computer code.
The self is the resultant of the interest of the genes.