Constructing the name of a hydrocarbon from its structure

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 
1meth5pent
2eth6hex
3prop7hept
4but8oct
 
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)2CHCH2CH3CH3CH2CH(CH3)2

 suffix  
saturatedane
1 or more C=Cene
1 or more C≡Cyne
The suffix for hydrocarbon molecules depends on the presence or absence of multiple bonds in the longest chain.

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).