This will convert a number to base 10 (decimal) from any base 2 through 36.
Version 2
Now you can convert from base 10 as well.
REM ========================================
REM Author: Phaelax
REM Convert from any base (up to 36) to base 10
REM Convert from base 10 to any base (up to 36)
REM ========================================
rem all values are equal to 65481 base 10
print convertToBase10("1111111111001001",2)
print convertToBase10("10022211020",3)
print convertToBase10("33333021",4)
print convertToBase10("4043411",5)
print convertToBase10("1223053",6)
print convertToBase10("361623",7)
print convertToBase10("177711",8)
print convertToBase10("108736",9)
print
print convertToBase10("45219",11)
print convertToBase10("31A89",12)
print convertToBase10("23A60",13)
print convertToBase10("19C13",14)
print convertToBase10("14606",15)
print convertToBase10("FFC9",16)
print convertToBase10("D59E",17)
print
print convertToBase10("3IMD",26)
print convertToBase10("2REH",28)
print convertToBase10("1EIX",36)
print
print convertFromBase10$(123,7)
print convertFromBase10$(65481,16)
wait key
end
REM ========================================
REM Converts x$ into base 10 equivalent from
REM the specified 'base'
REM ========================================
function convertToBase10(x$, base)
x$ = upper$(x$)
value = 0
power = len(x$)
for i = 1 to power
c$ = mid$(x$,i)
ascii = asc(c$)
if ascii >= 65 and ascii <= 90 then k = ascii - 55
if ascii >= 48 and ascii <= 57 then k = val(c$)
value = value + k*base^(power-i)
next i
endfunction value
REM ========================================
REM Given 'x' in base 10 form, returns
REM 'x' converted into the specified 'base'
REM ========================================
function convertFromBase10$(x, base)
repeat
r = x mod base
if r < 10 then c$ = str$(r)
if r >= 10 then c$ = chr$(r+55)
valueStr$ = c$ + valueStr$
x = x / base
until x = 0
endfunction valueStr$
If that's not enough and you need to convert a string into or from Base 64, then there's my other program
here.

> SELECT * FROM users WHERE clue > 0
> 0 rows returned