Encoding allows information from the outside world to be sensed in the form of chemical and physical stimuli.