An Anthracene-Based Chemosensor for Multiple Logic Operations at the Molecular Level