I’ll preface this answer by saying that we still don’t know much about what you’re asking. Much of that topic is still bleeding edge neurology research.
It does appear that specific neurons and synapses (connections between neurons) are responsible for memories.
In 2015 some researchers were able to activate a specific cluster of neurons in mice and force them to remember something. Then they removed said cluster and the mice were not able to remember the memory at all anymore.
Latest Answers