Base pairing is the specific bonding of complementary nucleotide bases to one another in a nucleic acid. In base pairing, a purine bonds with a pyrimidine; specifically, guanine forms a bond with cytosine, and adenine bonds with either thymine or uracil, depending on the type of nucleic acid involved.
Base pairing is so specific that if one strand of DNA is known, the other strand can be reconstructed. This process forms the basis for DNA replication and the transcription of messenger RNA.
The exactness of base pairing comes from the size of the bases. Two purines cannot fit on a rung, and two pyrimidines are not long enough to span a rung of a nucleic acid molecule. This concept is called Chargaff's rule of DNA base pairing. This rule also explains why the amount of adenine and thymine are equivalent and the amount of cytosine and guanine are equal in a DNA molecule.