The brain still functions for a short period after the heart stops.
However once the heart stops the brain cells die within 5 to 10 minutes and can result in permanent brain damage and even death.
Some brain activity can persist for a short period, although vital brain stem reflexes and electrical activity cease and stop immediately which leads to unconsciousness and eventual brain cell death as a result of lack of oxygen to the brain.
Within a matter of seconds of cardiac arrest, the vital brain stem reflexes as well as the electrical activity in the brain stop and cause a loss of consciousness.
And the longer the person's heart is stopped, the more oxygen deprivation the brain which experience which causes neurological damage.
CPR also known as cardiopulmonary resuscitation can restore blood flow and oxygen, and potentially prevent or minimize brain damage, especially if it's initiated within the first couple of minutes of cardiac arrest.
When someone's heart stops it's important to start CPR right away and call 911 to get emergency medical services on the way.
Don't simply wait until an ambulance or first responder arrives as those seconds count in saving the persons life.
Some brain activity, like gamma oscillations, may be detected even after the heart stops, but it does not equate to a person having awareness or consciousness.
And even if the blood flow is restored to the persons brain, some people may experience neurological deficits as a result of brain damage that can be sustained during the period that the brain was deprived of oxygen.