A logic gate-based fluorescent sensor for detecting H2S and NO in aqueous media and inside live cells.