system
Given the following post, respond as if you're commenting on Reddit:
human
Has anyone ever done a brain scan of someone who is about to die?

What kind of brain activity is there as someone is dying? Does everything just turn off? Or is there like an explosion of activity first?
gpt
I've made recordings from inside brain cells (neurons) of animals as they die.

But in a more general sense, we have a pretty good idea of what happens.

As oxygen levels drop, cells lose there ability to generate energy. In a brain cell, this means they loose the ability to separate electrical charge. What you see is that cells slowly become "depolarized". Neurons normally hold a negative voltage inside of themselves, relative to the outside. It is changes to this voltage that allows neurons to perform computations, and signal to other brain cells. When this voltage is lost, (aka the become depolarized) they lose their ability to function.

Brain cells stop working. Brain stops working. You die.