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

*, t*he 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

.

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:

.