Mathwords logoMathwords

Mixed Radix — Definition, Formula & Example

Mixed radix is a way of writing numbers in which each digit position has its own base, instead of one base for every position. Clock time works this way: 60 seconds make a minute, 60 minutes make an hour, and 24 hours make a day.

Fix integer radices b0,b1,…,bk−1≥2b_0, b_1, \dots, b_{k-1} \ge 2. A mixed-radix representation of a nonnegative integer NN is a digit string (dk dk−1⋯d1 d0)(d_k\, d_{k-1} \cdots d_1\, d_0) with 0≤di<bi0 \le d_i < b_i for 0≤i<k0 \le i < k and dk≥0d_k \ge 0, such that N=∑i=0kdiwiN = \sum_{i=0}^{k} d_i w_i. The place values are w0=1w_0 = 1 and wi=b0b1⋯bi−1w_i = b_0 b_1 \cdots b_{i-1}. Under these constraints, every nonnegative integer has exactly one such representation.

Key Formula

N=∑i=0kdi∏j=0i−1bj=d0+d1b0+d2b0b1+⋯N = \sum_{i=0}^{k} d_i \prod_{j=0}^{i-1} b_j = d_0 + d_1 b_0 + d_2 b_0 b_1 + \cdots
Where:
  • NN = The nonnegative integer being represented
  • did_i = The digit in position ii, counting from i=0i = 0 at the right; it must satisfy 0≤di<bi0 \le d_i < b_i
  • bjb_j = The radix (base) of position jj
  • ∏j=0i−1bj\prod_{j=0}^{i-1} b_j = The place value of position ii: the product of all radices to its right (an empty product equals 1)

Worked Example

Problem: Write 100,000 seconds in the mixed-radix system (days, hours, minutes, seconds), whose radices from right to left are 60, 60, and 24.
Step 1: Divide by the seconds radix, 60. The remainder is the seconds digit, and the quotient carries to the next position.
100,000=60⋅1,666+40⇒d0=40100{,}000 = 60 \cdot 1{,}666 + 40 \quad\Rightarrow\quad d_0 = 40
Step 2: Divide that quotient by the minutes radix, which is also 60. The remainder is the minutes digit.
1,666=60⋅27+46⇒d1=461{,}666 = 60 \cdot 27 + 46 \quad\Rightarrow\quad d_1 = 46
Step 3: Now divide by the hours radix, 24. This radix differs from the previous one, and that is what makes the system mixed. The remainder is the hours digit, and the quotient is the days digit.
27=24⋅1+3⇒d2=3,  d3=127 = 24 \cdot 1 + 3 \quad\Rightarrow\quad d_2 = 3,\; d_3 = 1
Answer: 100,000 seconds is 1 day, 3 hours, 46 minutes, 40 seconds. Check it with the formula: 1⋅86,400+3⋅3,600+46⋅60+40=100,0001 \cdot 86{,}400 + 3 \cdot 3{,}600 + 46 \cdot 60 + 40 = 100{,}000.

Why It Matters

In computer science, a cell's position in a multidimensional array is stored as a mixed-radix number whose radices are the array's dimensions. The factorial number system, with place values 1!,2!,3!,…1!, 2!, 3!, \dots, is a mixed-radix system. It assigns each permutation a unique rank, which is used in combinatorics and in algorithms that enumerate orderings.

Common Mistakes

Mistake: Multiplying a digit by its own radix instead of by the product of all radices to its right. For example, a student gives the hours digit a place value of 24.
Correction: The place value of the hours position is 60⋅60=3,60060 \cdot 60 = 3{,}600, which is the product of the seconds and minutes radices. A position's own radix only limits how large its digit can be.

Related Terms

  • Radix (Number Base) — Single-base case where every position shares one radix
  • Modular Arithmetic — Each digit is a remainder after division by a radix
  • Modulo n — Operation that extracts each mixed-radix digit from a quotient
  • Imperial System — Units like feet and inches form everyday mixed radices
  • Place Value — Positional digit values generalized by mixed radix
  • Remainder — Used to extract each digit in a mixed radix