Introduction to oxidation numbers

Redox reactions are characterised by electron transfer. 

Oxidation number (state) is an electron-bookkeeping device that can be used to keep track of electron-ownership. 

Atoms in the elemental form have, by definition, an oxidation number of 0.

For binary (two element) compounds the oxidation number (state) of the

element of higher electronegativity is negative
element of lower electronegativity is positive.


Consider NaCl: oxidation number
for Na positive for Cl negative
Consider CaS: oxidation number
for Ca positive for S negative  
 
12group
H+ HHe
Li+Be2+         O2–FNe
Na+Mg2+ Al3+  S2–ClAr
K+Ca2+     BrKr
Rb+Sr2+     IXe
Cs+Ba2+       

As shown above oxidation number of the metal and non-metal in a binary ionic compound can be understood with the position of those in the periodic table.
 
The metallic elements shown exist in all of their compounds as cations with the given oxidation number.
In their binary compounds with metals, the nonmetallic elements have the negative oxidation numbers (states) shown .

Hydrogen is the most metallic of the nonmetals. The oxidation number (state) of H is 
+1 in all compounds where it is bonded to a nonmetal.
-1 in its binary compounds with metals.

Oxygen has an oxidation number (state) of -2  except in peroxides where it is -1. 
Peroxides are ions or molecules that have an oxygen-oxygen single bond. 
O22– is peroxide anion.  H2O2 (HO-OH) is hydrogen peroxide.