The process of converting sensory information into a memory representation that can be stored and retrieved.