Naming hydrocarbons

The name of a hydrocarbon can be divided into three parts (prefix + stem + suffix).

The stem is defined by the number of carbon atoms in the longest chain (including carbon-carbon multiple bonds if present).
 
Number
of carbons
stem  Number 
of carbons 
stem 
1 meth 5 pent
2 eth 6 hex
3 prop 7 hept
4 but 8 oct

Counting carbon atoms: Consider the five representations of the same molecule shown below. In each case the number of carbon atoms in the longest chain is four. This is easily seen for the two representations at the right-hand end. Roll your mouse over the first three structures to see that it is  true for these also.
 
(CH3)2CHCH2CH3

CH3CH2CH(CH3)2


The suffix for hydrocarbon molecules depends on the presence or absence of multiple bonds in the longest chain.
 
  suffix  
saturated ane
1 or more C=C ene

The position of a multiple bond is shown by -number- between the stem and the suffix.  That number is referred to as the locator.
 
Numbering carbon atoms in the chain for alkenes and alkynes: C-1 is the end of the chain closest to the unsaturation. The number used in the name is the lower of the two numbers of a pair of multiply bonded carbons (for example, CH3CH2CH2CH=CH2 is pent-1-ene).