(It is similar backwards. You know that the base of the hexadecimal numbers is 20 in your octal system. If you have 173(hex), for example, it is
3+7*20+1*20^2=3+(7*2)*10+4*100=
3+(10+6)*10+4*100=3+6*10+5*100=563.)