In the Name of Allah, The Most Gracious, Most Merciful
Praise be to Allah, The Lord (The One and Only) of the Worlds, and blessings and peace be upon our Master Muhammad, the Truthful and the Faithful.
The precise fact is that heart is the center of self. Brain contains a memory that looks like the memory of the computer, and so the brain manifests the memory in that way. However, if we pull the plug of the computer, its memory will be erased.
As for the heart, it resembles the hard drive in the computer, and accordingly, all the information in it are saved mechanically and not electrically, so they are not erased upon pulling the plug of the computer, and so is the heart. Therefore, brain is like the memory of the computer, whereas the heart is like its hard drive. Pay attention to the delicate meaning of the following Ayah:
﴾ And have they hearts wherewith to understand ﴿
This means that the heart is the core of reasoning, whereas the brain is the core of perception