By definition, hydrocarbons are organic compounds consisting ONLY of carbon and hydrogen atoms. This is a fundamental concept in organic chemistry - the prefix 'hydro-' refers to hydrogen, and '-carbon' refers to carbon. Oxygen, nitrogen, and carbon dioxide are not part of pure hydrocarbons.