Base Conversions from Base 2 through 100 Using Radix Points

This Demonstration converts a given number in some base from 2 to 100 into all bases from 2 to 100.
Use the buttons to input the number, which may contain the characters '.', 0 through 9, and both lower- and uppercase English and Greek letters. Here is how the characters are mapped to digits:
Move the slider to change the input base, output base and the output resolution.
This is similar to the Wolfram Language function BaseForm[], but handles a larger range of bases and handles numbers with a radix point ('.').

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

DETAILS

A number written in a base form can be converted into any other base form. In this Demonstration, the number is first converted into base 10, and the resulting decimal number is converted into the required base form.
Given an integer in base , the decimal value is obtained by multiplying the digit by and summing the result. Digits to the left of the radix point are multiplied by to increasing powers, starting at . Digits to the right of the radix are multiplied by decreasing powers of .
For example:
To convert a decimal number to base , let be the integer part of the decimal number and be the fractional part.
First compute the integer part. Divide by ; the remainder is the least significant digit of the integer. The process repeats: divide the quotient by , and use the remainder as the next most significant digit of the integer part. The process terminates when the quotient is 0, and the last remainder is the most significant digit.
Next, compute the fractional part. Let ; is always less than . The integer part of is the next digit to the right of the radix point of the number in base . This digit may be zero.
Continue multiplying the fractional part of by until the fractional part is zero or a sufficient resolution is reached.
For example, 0.44 to base 6:
, giving the answer to one digit precision of
, giving the answer to two digit precision of
, giving the answer to three digit precision of
, giving the answer to four digit precision of
, giving the answer to five digit precision of
, giving the answer to six digit precision of
, giving the answer to seven digit precision of
...
The remainder repeats: .
References
[1] Wikipedia. "Radix." (Feb 20, 2020) en.wikipedia.org/wiki/Radix.
[2] Wikipedia. "Numeral System". (Feb 20 2020) en.wikipedia.org/wiki/Numeral_system.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.