Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: number base conversion

From:Dennis Paul Himes <himes@...>
Date:Monday, January 12, 2004, 3:57
Gary Shannon <fiziwig@...> wrote:
> > --- Marty Rosenberg <vortexconcultures@...> > wrote: > > > > First of all, I much appreciate all of the root > > generation systems. They seem very useful. I have > > one question about them though: How do you convert > > numbers between different bases quickly? I know a > > very long, complicated way to do it which I used for > > Deniedergy, but that's long and complicated. Plus, > > it only works for moving to smaller bases. > > convert the number 76382 to base 26: > > 76382 / 26 = 2935 with 18 remainder
Actually, it's 2937 with 20 remainder.
> 2935 / 26 = 112 with 23 remainder > 112 / 26 = 4 with 8 remainder > 4 / 26 is zero with 4 remainder
Proceeding from 2937, r. 20: 2937 / 26 = 112 with 25 remainder 112 / 26 = 4 with 8 remainder 4 / 26 = 0 with 4 remainder
> remainders are 18, 23, 8, 4
20, 25, 8, 4
> change those to letters: A=0, B=1, C=2, etc.... > > gives 18 = S, 23 = X, 8 = I, 4 = E
20 = U, 25 = Z, 8 = I, 4 = E
> so base 26 is "SXIE"
That's backwards. It would be "EIXS" if your initial calculations had been correct. It's actually "EIZU". =========================================================================== Dennis Paul Himes <> himes@cshore.com http://home.cshore.com/himes/dennis.htm Gladilatian page: http://home.cshore.com/himes/glad/lang.htm Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air." - Romeo & Juliet, Act I Scene iv Verse 96-99

Replies

Gary Shannon <fiziwig@...>
Joe <joe@...>