Base Conversion

Category:
Dates and Math
Type:
Modules
Difficulty:
Intermediate
Author:
Richard Deeming

Version Compatibility:

More information:
Provides simple conversion between numbers in different bases. With one function, numbers can be converted between decimal, binary, octal and hexadecimal. Control over the formatting of non-decimal numbers is provided, and you can even output fractional parts in non-decimal numbers. Bases can be added as required - see the comments for more details. An advanced example (base 60 conversion) is included to demonstrate non-standard bases.

Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.

Download mbases.zip