Program number 9
This program will convert a decimal (Base10) number into a binary (Base2) number, then back into Base10. There are subroutines in JavaScript for a direct conversion (without doing it manually), but I didn't use that - I don't know if I was supposed to. Anyway, this program I spent the most time on, because it was really hard to do! It is also my longest program.
Decimal number:
Binary number:
Decimal number:

Note: The maximum supported decimal number is 524,288. See source code for how to increase this limit (it's possible!). During testing, some features of the programming (removing leading zeroes, for example) didn't work in Mozilla 0.9.9, but worked in Internet Explorer.


Copyright © 2002 Derek Tsang