AppleScript doesn’t have a built-in mechanism to work with digits other than decimal.
However, there are lots of solutions: scripting additions, such as HipTools or 24U Hex, the faceless ultra-scriptable application Extra Suites or lots of “vanilla” handlers (you can find some of these at our sections Code Exchange and ScriptBuilders.