The electroencephalogram (EEG) is a medical test that records the brain's electrical activity to diagnose various neurological conditions. Developed by Hans Berger in 1929, the EEG captures brain waves through electrodes placed on the scalp and is used to detect abnormalities related to brain functions, consciousness states, and memory. The EEG's measurements reveal distinct frequency bands (beta, alpha, theta, delta), which indicate different levels of brain activity and can help assess conditions like sleep disorders, tumors, and brain injuries.