Aptamer-linked smart materials responsive to a combination of any two analytes, including adenosine, cocaine, and K+, are demonstrated. The effect of small molecules on the properties of the nanomaterials can be either highly cooperative or non-cooperative, which can be described as logic gates with chemical inputs and colorimetric output (see figure).