Younger and older physically active and sedentary adults participated in a task switching paradigm in which they performed a task repeatedly or switched between two different tasks, while measures of response speed, response accuracy, P3 amplitude, and P3 latency were recorded. Overall, response times were faster and midline P3 amplitudes were larger for the active than for the sedentary participants. P3 latencies discriminated between active and sedentary individuals on trials in which multiple task sets were maintained in memory and task switches occurred unpredictably but not in blocks of trials in which a single task was repeatedly performed. Results are discussed in terms of the specificity and generality of physical activity effects on cognition. © 2005 Elsevier B.V. All rights reserved.