Electroencephalography is a way to record certain patterns of brain activity, on the skin of the head. Nerve cells use electricity to transmit information. It is one of the methods of diagnosis which can be used for conditions that affect the nerves. An electroencephalogram is a recorded electroencephalography. Both are abbreviated EEG. Electroencephalography is used to detect epilepsy, coma, sleep and brain death. Special adaptations exists to research sleep, for example the length of sleep rhythms. Sleep occurs in different phases, the specially adapted EEG can show the length of these phases.