Sub topic 7
Finding an Unknown Base
Prerequisites and the key equation
Assume you know whole-number arithmetic, powers, basic algebra, and remainders. You should also know that a number written in base \(b\) uses place values that are powers of \(b\).
A base is an integer \(b \ge 2\). Every digit must be less than \(b\). For example, base 5 allows only the digits 0, 1, 2, 3, and 4.
For a two-digit number \((xy)_b\),
\[ (xy)_b=xb+y. \]
For a three-digit number \((xyz)_b\),
\[ (xyz)_b=xb^2+yb+z. \]
The unknown base becomes an algebra variable. Expand each numeral, form an equation, and solve for \(b\).
| Base notation | Algebraic value |
|---|---|
| \((24)_b\) | \(2b+4\) |
| \((103)_b\) | \(b^2+3\) |
| \((x7)_b\) | \(xb+7\) |
A linear example
Suppose
\[ (14)b+(25)b=45_{10}. \]
Expand both base-\(b\) numbers:
\[ (b+4)+(2b+5)=45. \]
Combine like terms:
\[ 3b+9=45. \]
Therefore,
\[ 3b=36,\qquad b=12. \]
The answer is valid because the largest digit used is 5, and \(12>5\). Thus,
\[ (14){12}+(25){12}=45_{10}. \]
Always perform the digit check. An algebraic answer such as \(b=4\) would be invalid if the original expression contained the digit 4, because digits must be strictly smaller than the base.
A quadratic example
Now consider
\[ (101)b+(12)b=113_{10}. \]
Expand the numerals:
\[ (b^2+1)+(b+2)=113. \]
So,
\[ b^2+b+3=113, \]
which gives
\[ b^2+b-110=0. \]
Factor:
\[ (b-10)(b+11)=0. \]
The possible roots are \(b=10\) and \(b=-11\). A base must be positive and at least 2, so \(b=10\).
Check:
\[ (101){10}+(12){10}=101+12=113. \]
Working with a digit variable
Sometimes the base is known, but a digit is unknown. The same expansion method applies. For example, in base 8,
\[ (3x)8=29{10}. \]
This means
\[ 3(8)+x=29, \]
so \(x=5\). The result is valid because \(0\le x\le7\).
If both a digit and the base are unknown, solve the equation and then apply both restrictions:
- \(b\) must be an integer with \(b\ge2\).
- Every digit must lie between 0 and \(b-1\).
- A leading digit cannot be 0.
The following flow shows the reliable order.
Quick verification with code
This program checks the first example by testing possible bases.
def value_in_base(digits, base):
value = 0
for digit in digits:
value = value * base + digit
return value
for base in range(2, 20):
left = value_in_base([1, 4], base) + value_in_base([2, 5], base)
if left == 45:
print(base)The program prints 12. In a CAT question, algebra is usually faster, but a size estimate and substitution check can catch sign errors.
Exercise
Find the base b if (32)b + (14)b = 51 in decimal.
Show answer
Expand: (3b+2)+(b+4)=51, so 4b+6=51 and b=45/4. Since the result is not an integer base, no valid base satisfies the equation.