system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: is there electricity in the brain, and if so how is it generated?
gpt
Yes.  It is generated along the cell membranes of neurons and it’s called an action potential.  Specialized proteins pump sodium ions outside the cell and potassium ions into the cell.  This creates an energy gradient.  When a nerve signal is sent, each individual cell opens their gates causing potassium to rush out and sodium to rush in.  This sudden change in ion concentrations causes a tiny electrical impulse which is passed along to the next cell and the next.