DNA and RNA are both nucleic acids composed of nucleotides that contain a phosphate, sugar, and nitrogenous base. DNA has the sugar deoxyribose and bases adenine, thymine, guanine, and cytosine. RNA has the sugar ribose and replaces thymine with uracil. DNA stores genetic information in the cell nucleus while RNA assists in protein synthesis by carrying messages from DNA and joining amino acids.