Decimal <-> Binary Converter

Why:

For a project several years ago I was required to use a decimal to binary converter and a binary to decimal converter. I had many options but chose to use JavaScript because of its flexibility and common availability. After several quick Google searches I found 2 or 3 different scripts. All of them were exceedinly slow and inefficient. Some were so long I didn't even bother to copy and paste the whole thing. Others would freeze my computer when trying to calculate numbers above 20,000. After a bit of thinking it was obvious that if I wanted something that would work I'd have to do it myself. A few hours later and some help from my dad I was able to write this script.

What:

- Two JavaScript functions to convert any number to binary and any binary number to a regular number

- Faster and simpler than any other decimal to binary script available

- Easy to implant with full instructions and example in download package

Where:

Download

Example:

Decimal To Binary:

Binary To Decimal: