The oxidation state of hydrogen is +1 in its compounds, except for metal hydrides, such as NaH, LiH, etc., in which the oxidation state for H is -1. The oxidation states of other elements are then assigned to make the algebraic sum of the oxidation states equal to the net charge on the molecule or ion.