The purine–pyrimidine and hydrogen donor–acceptor patterns governing nucleotide recognition are shown to correspond formally to a digital error-detecting (parity) code, suggesting that factors other than physicochemical issues alone shaped the natural nucleotide alphabet.