Rules for Assigning Oxidation Numbers
The oxidation number of the atoms of an uncombined element is 0.
The sum of the oxidation numbers of all atoms in a substance must equal the total charge on the species: 0 for molecules; the ionic charge for ions.
Fluorine has an oxidation number of -1 in its compounds.
Hydrogen has an oxidation number of +1 unless it is combined with metals, in which case it has an oxidation number of -1.