To assign oxidation numbers to things, first you look at how many electrons are involved in bonding, then, you assign the electrons to the more electronegative atom in the bond, this atom will become as -ve as the nbumber of electrons that are assigned to it, and the other one will become as positive as the electrons that it had to give to the electronegative atom.
You do this for the other side of the reaction.
atoms which have gone up an oxidation number (become more positive/ or less negative) have been oxidised.
And atoms that have become more negative (or less positive) have been reduced.
Easy as that