This article shows how to teach molecules the basics of logic and how to integrate complicated logic operations with relatively simple molecules. A special focus is put on the realization of multi-level fluorescent switches with chemical inputs as well as on the demonstration of various memory-based operations with all-optical photochromic switches.