Synthesis, fluorescence-sensing and molecular logic of two water-soluble 1,8-naphthalimides.