First number is 4725
On dividing 47 by 25, we get 1 as quotient and 22 as reminder
On dividing 25 by 22, we get 1 as quotient and 3 as reminder
On dividing 47 by 3, we get 15 as quotient and 2 as reminder
On dividing 25 by 2, we get 12 as quotient and 1 as reminder
On dividing 47 by 1, we get 47 as quotient and 0 as reminder
Now adding all the quotient we get 1+1+15+12+47 = 76
Take similar steps for finding the other codes.
Remember that you have to proceed upto the step where 0 is obtained as reminder.