Both nucleotide and nucleoside are composed of a pentose and a nitrogenous base. The pentose sugar may be either ribose or deoxyribose and the nitrogenous base may be one of four types – adenine, guanine, cytosine, or thymine. When a nucleotide links to a phosphate group, it becomes a nucleotide.