Ultraminiaturized processors incorporating molecular components can be developed only after devising efficient strategies to communicate signals at the molecular level. We have demonstrated that a three-state molecular switch responds to ultraviolet light, visible light, and H+, attenuating the emission intensity of a fluorescent probe. Intermolecular communication is responsible for the transduction of three input signals into a single optical output. The behavior of the communicating ensemble of molecules corresponds to that of a logic circuit incorporating seven gates.