A Binary Approach for Selective Recognition of Nucleic Acids and Proteins