Вот добыл нечто крутое:
; Taken from http://www.codersworkshop.com/viewpo...id=12259#12259
; modified to allow for upper or lower case
Function BaseToDec(basestr$, base)
;Converts a number of a particular base (up to 34) to a decimal integer
;eg BaseToInt("110",2 ) = 6
; BaseToInt("A",16 ) = 10
If base>34 Then Return 0
endnum = 0:cnt=0
For i=Len(basestr) To 1 Step -1
char$ = Upper(Mid(basestr,i,1))
If char=>"A" And char=<"Z"
charnum = Asc(char)-Asc("A")+10
Else
charnum = char
End If
If charnum>base Then Return 0 ;ERROR!
endnum = endnum + charnum * (base^cnt)
cnt=cnt+1
Next
Return endnum
End Function
Function DecToBase$(intnum, base)
;Converts a decimal integer to a particular base (up to 34)
;eg IntToBase(10,2) = "1010"
intnum=intnum+1
If base>34 Then Return "0"
endstr$="":cnt=0
While base^cnt<intnum
;Find the length of the number
cnt=cnt+1
Wend
For i=cnt-1 To 0 Step -1
charnum=0
Repeat
charnum=charnum+1
Until intnum-charnum*(base^i)=<0
charnum=charnum-1
If charnum>9
char$ = Chr(Asc("A")-10+charnum)
Else
char$ = charnum
End If
endstr=endstr+char
intnum = intnum - charnum*(base^i)
Next
Return endstr
End Function