The DNA molecule contains all the information needed for an organism to develop and function. It's locked up inside the four chemical bases, adenine, thymine, guanine and cytosine. The diversity of life comes from a rearrangement of their sequences.
The structure of the DNA molecule is of a twisted double helix. Think of a very long ladder that has been twisted. The rungs of the ladder are the four chemical bases, and there are approximately six billion of them in the human genome.
The four nitrogenous bases that make up the DNA structure are divided into two groups, called purines and pyrimidines.
Adenine and guanine are purines, and chemically are double-ringed structures - a five cornered ring and a six cornered ring. They are much larger than pyrimidines.
Cytosine and thymine are pyrimidines and are single-ringed structures - a six cornered ring.
One base from one side of the DNA molecule will be joined to a base on the other side (to form a base pair) by a weak hydrogen bond. This gives DNA its stability but the bond is not too strong that it can't be undone when DNA needs to replicate or be pulled apart for protein synthesis.
A purine can only bind to a pyrimidine and specific bases bind to each other. There are no other combinations, so adenine binds only to thymine and cytosine binds only to guanine. It's usually written as AT and CG or TA and GC. This is known as complementary base pairing. Its significance was one of the landmark concepts in Crick and Watson's 1953 paper on the structure of DNA. It revolutionised our understanding of DNA and how it can be manipulated. They wrote "It has not escaped our notice that the specific pairing we have postulated immediately suggests a possible copying mechanism for the genetic material."
The chemical formulas of the four bases are as follows;
Adenine = C5H5N5
And There's More ...
There is actually one other pyrimidine base, and it is called uracil. However, it doesn't appear in DNA. It takes the place of thymine in RNA and has the following chemical formula C4H4N2O2.
The Path to the Double Helix: The Discovery of DNA. Robert C. Olby