Many higher order cognitive functions that plan, regulate, and monitor behavior have been neglected by the community of cognitive psychologists. We intend to address this shortcoming by determining the behavioral nature and neural implementation of one such function, which we call error processing, in humans. It has been demonstrated that activation of an error detection system manifests itself at the scalp as a negative deflection in the event-related brain potential (ERP). Preliminary evidence suggested that this error-detection system is mediated, at least in part, by the anterior cingulate gyrus. The primary goal now is to confirm that error-related activity occurs in the anterior cingulate by employing functional neuroimaging techniques such as ERPs and magnetoencephalograms (MEG), and by the development of a biologically plausible computational model of anterior cingulate dynamics. A secondary goal is to distinguish, using ERPs, between behaviors that activate and behaviors that do not activate the error detection system. This research is expected to elucidate the nature of several clinical disorders, including Obsessive-Compulsive Disorder and various psychopathologies associated with lesions of the frontal lobes.