Jump to content

Mixed radix

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ZeroOne (talk | contribs) at 16:21, 10 October 2004 (Factorial based radix: unambiguousness. someone check my <math> markup, please?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Mixed radix numeral systems are unique in that the numerical base may vary from position to position. Such numerical representation is advantageous when representing units that are equivalent to each other, but not by the same ratio. For example, 2 weeks, 5 days, 7 hours, 45 minutes, 15 seconds, and 500 milliseconds can be rendered in mixed-radix notation as:

The digits are written above their base, and a semicolon is used to indicate the radix point.

Mixed-radix numbers of the same base can be manipulated using a generalization of manual arithmetic algorithms.

Factorial based radix

An interesting proposal is a factorial based radix:

radix:     5!  4!  3!  2!  1!
decimal: 120  24   6   2   1

For example, the biggest number that could be represented with five digits would be 54321 which equals 719 in decimal: 5*5!+4*4!+3*3!+2*2!+1*1!. It might not be clear at first sight but factorial based numbering system is also unambiguous. No number can be represented by more than one way because the sum of respective factorials multiplied by the index is always the next factorial minus one:

External Resources

Donald E. Knuth. The Art of Computer Programming, Volume 2. pp209