oxidation states in oxides and hydroxides of any single element, and in acids such as sulfuric acid () or dichromic acid (). Its coverage can be extended either by a list of exceptions or by assigning priority to the postulates. The latter works for hydrogen peroxide () where the priority of rule 1 leaves both oxygens with oxidation state −1. Additional postulates and their ranking may expand the range of compounds to fit a textbook's scope. As an example, one postulatory algorithm from many possible; in a sequence of decreasing priority: An element in a free form has OS = 0. In a compound or ion, the sum of the oxidation states equals the total charge of the compound or ion. Fluorine in compounds has OS = −1; this extends to chlorine and bromine only when not bonded to a lighter halogen, oxygen or nitrogen. Group 1 and group 2 metals in compounds have OS = +1 and +2, respectively. Hydrogen has OS = +1 but adopts −1 when bonded as a hydride to metals or metalloids. Oxygen in compounds has OS = −2 but only when not bonded to oxygen (e.g. in peroxides) or fluorine. This set of postulates covers oxidation states of fluorides, chlorides, bromides, oxides, hydroxides, and hydrides of any single element. It covers all oxoacids of any central atom (and all their fluoro-, chloro-, and bromo-relatives), as well as salts of such acids with group 1 and 2 metals. It also covers iodides, sulfides, and similar simple salts of these metals. Algorithm of assigning bonds This algorithm is performed on a Lewis structure (a diagram that shows all valence electrons). Oxidation state equals the charge of an atom after each of its heteronuclear bonds has been assigned to the more-electronegative partner of the bond (except when that partner is a reversibly bonded Lewis-acid ligand) and homonuclear bonds have been divided equally: where each "—" represents an electron pair (either shared between two atoms or solely on one atom), and "OS" is the oxidation state as a numerical variable. After the electrons have been assigned according to the vertical red lines on the formula, the total number of valence electrons that now "belong" to each atom is subtracted from the number of valence electrons of the neutral atom (such as 5 for nitrogen in group 15) to yield that atom's oxidation state. This example shows the importance