This paper argues that self-awareness emerges in organisms whose brains have a sufficiently integrated, complex ability for associative learning and memory. Continual sensory input of information related to the organism leads to the formation of a set of associations that may be termed an organismal "self-image". After providing the basic mechanistic basis for the emergence of an organismal self-image, this paper proceeds to go through a representative list of behaviors associated with self-awareness, and shows how associative memory and learning, combined with an organismal self-image, leads to the emergence of these various behaviors. This paper also discusses various tautologies that invariably emerge when discussing self-awareness. We continue with various speculations on manipulating self-awareness, and discuss how concepts from set and logic theory may provide a useful set of tools for understanding the emergence of higher cognitive functions in complex organisms. (C) 2008 Elsevier Inc. All rights reserved.