Adventures in JavaScript: Number Bases

Here’s just a quick little JavaScript that will convert numbers between different bases. It grew out of the idea that numbers in a system based on π would be much more useful in engineering that the regular old ones. Well, just because one can do it doesn’t mean it’s a good idea, but it was fun figuring out how to best implement such a conversion. Once you know how to do it to and from one base, all other bases are trivial. That’s why there are a couple more besides π.

Enter a number into any field to convert it to the other bases.

decimal:
binary:
octal:
hexadecimal:
base π:
base e:


last posts in javascript:

No Comments

Post a Comment

Your email is never shared.