Number Bases
Lesson · Beginner
Number Theory
Number Representation in Base b
Base 3 to 10
Base b to 10
Base 10 to 3

Repeated division gives the digits from the remainders.
Find b if
Convert to base 10:
so
Since a base must be positive and larger than every digit used, b > 3.
Therefore, b = 5.
A two-digit base-b number is (23)ᵦ and reversing its digits increases its value by 12. Find b.
We have
and
Since reversing the digits increases the value by 12,
so
Therefore, b = 13.
How many digits does 1000 have when written in base 2?
We need to find consecutive powers of 2 containing 1000.
Since 2⁹ = 512 and 2¹⁰ = 1024, we have
Therefore, 1000 has 10 digits in base 2.
What is the last digit of 2026 when written in base 7?
The last digit in base 7 is the remainder when the number is divided by 7.
Since
the last digit is 3.
The last digit of a number in base b is determined by
The last two digits are determined by
More generally, the last k digits are determined by
Since
we have
Therefore,
So a number has the same remainder modulo b − 1 as the sum of its digits.
In base 10, this gives the familiar divisibility rule for 9:
Since
the powers alternate:
Therefore, a number is congruent modulo b + 1 to the alternating sum of its digits.
In base 10,
which gives the divisibility rule for 11.
For an n-digit number, the first digit cannot be 0, so there are b − 1 choices for the first digit.
Each of the remaining n − 1 digits has b choices.
Therefore, the number of n-digit base-b positive integers is
The smallest n-digit base-b number is
The largest is
Therefore, N has exactly n digits in base b if and only if
In base b,
For example, (203)₃ is not a valid base-3 number because the digit 3 is not allowed.
Suppose an equation gives b = 4 but the original numeral contains digit 7. Then b = 4 must be rejected.
Always check b > every digit appearing in the numeral.