
While finding oxidation number, in case of oxides, oxygen has oxidation number of -2. In case of peroxides it is -1, and in case of superoxides it is -1/2. This is how you can find peroxides by defining the oxidation states of oxygen in the compounds.