radix calculations

Oops,
i want to calculate a formula using a radix computation within applescript, clueless where to start from.