# Number Bases (version 14 March 2018)

An introduction to number bases, using other numbers apart from 10 for the base in which to write numbers.
Bases need not be whole numbers themselves; we look at negative bases; negative "digits", using the Fibonacci numbers as the base and also the factorials and binomial numbers and even an irrational number Phi (the golden ratio).
The calculators on this page require JavaScript but you appear to have switched JavaScript off (it is disabled). Please go to the Preferences for this browser and enable it if you want to use the calculators, section links and other interactive features, then Reload this page.
The icon means there is a You Do the Maths... section of questions to start your own investigations. The calculator icon indicates that there is a live interactive calculator in that section.

## Representing whole numbers in different bases

We normally write numbers in base 10 so that each digit counts a power of 10 in the value:
2017 = 2×102 + 0×102 + 1×101 + 7×100
In the American and UK systems of measuring liquids in pints and gallons, there are 8 pints to 1 gallon, so 20 pints represents 2 gallons and 4 pints.
It used to be the case that 8 gallons make 1 bushel in the UK but the American and British systems are now different. This is a base 8 system where we counts in 8s:
90 pints is 1×82 + 3×8 + 2:
90 in base 10 is 132 in base 8

### Digits

We see that in base 10 (the decimal system), we need only 10 symbols, the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
In Base 8 (octal) we need only the 8 symbols 0, 1, 2, 3, 4, 5, 6, 7 because 8 in one column will convert into 1 in the next higher column.
Similarly in base β we need only β symbols for the digits, one digit per column.
So what if the base is bigger than 10?
Computer engineers often use this since computers work in Base 2 (Binary) using binary-digits 0, 1 and it was often more convenient to use base 16 (hexadecimal) using the "digits" 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F.
In base β we need only β 'digit' symbols
To show what base a number is in, we write its base as a suffix after the number representation, e.g.:
90 = 1328
10 = 128
7 = 125
If we omit the base then the base used is 10.

### Names of Bases

 base 2: binary base 3: ternary, trinary base 4: quaternary base 5: quintal, quinary base 6: sextal, senary base 7: septal, septenary base 8: octal base 9: nonary base 10: decimal, denary base 11: undecimal base 12: duodecimal base 16: hexadecimal base 20: vigesimal base 30: trigesimal base 40: quadragesimal base 50: quinquagesimal base 60: sexagesimal base 70: septuagesimal, septagesimal base 80: octagesimal base 90: nonagesimal, nonogesimal base 100: centesimal
The vigesimal system was used by the Mayan civilisation in central America and also in Britain where 20 is called a "score". Other cultures used a base 5 system (New Hebrides) or a binary system. 12 (duodecimal) was also popular because it is easy to divide by 2, 3 and 4 and the ancient Babylonians used base 60 (sexagesimal) because it was also easy to divide by 2, 3, 4 and 5. The system of money used in Britain from the 8th century until 1971 had 12 pence (d) in a shilling (s) and 20 shillings in a pound (£).

### An easy method to convert a number to and from base β

Let's look at an example.
To convert a (decimal) number to base 6, say, keep dividing the number by 6 recording any remainders. The remainders become the base 6 representation of the number.
 6 5755 6 959 rem = 1 5755 = 6×959 + 1 6 159 rem = 5 959 = 6×159 + 5 6 26 rem = 3 159 = 6×26 + 3 6 4 rem = 2 26 = 6×4 + 2 0 rem = 4 4 = 6×0 + 4

To see the base 6 representation, write down the reminders from the bottom to the top:
5755 = 423516
This works for any numeric base and shows that the 'digits' of base β must be 0,1,2,...,β-1 because they are the remainders on dividing by β.
To convert a number from base β to decimal we reverse the process, starting with the leftmost digit and continually multiplying by 6 and adding in the next digit as shown in the multiplications in the table above, working from the bottom row to the top.

## Negative numbers

We usually represent negative numbers with a negative sign (–) before the value so that we have, in increasing order, the numbers
... -3 -2 -1 0 1 2 3 ...
However, we can represent both positive and negative values without using a sign if we have a negative base

### Negative Bases

If we use base -10 (negadecimal) then the columns have the values
 Column: Meaning Value ... 4 3 2 1 0 ... (-10)4 (-10)3 (-10)2 (-10)1 (-10)0 ... 10000 –1000 100 –10 1
At first it may not be obvious that
Every whole number value, both positive and negative, has a unique representation in base -10 (negadecimal) using just the digits 0 to 9 without needing a sign
For instance,
• 0 to 9 are as normal
• 10 = 100−90 = 190−10
• 11 to 19 are therefore 11=191−10, 12=192−10, ... , 19=199−10
• 20=180−10 and so on up to
• 91=111−10, 92=112−10, ... 99=119−10
• 100 is back to 'normal', 100=100−10
What about 1000? Try these practice problems:

#### You Do The Maths...

1. Write these numbers in base −10:
110, 119, 150, 199, 301, 399, 901, 999
2. How are these (base 10) values represented in base −10:
−1 −2 −9 −10 −11 −100 −1000
3. What are the first 5 column headers in base −2?
Make a table of numbers from −12 to 12 in base −2.

### Negative digits

Instead of using powers of a negative number base to represent negative values, we could use negative 'digits'.
This is not as peculiar as it might at first sound. For example if the time is 2:50 then we can say "10 to 3" which is in effect using the hour 3 and the minutes -10.
We can also see times expressed with minutes from 0 to 59 (base 60) on timetables for example and, when saying the time the minutes go from -29 to +30 as in "29 minutes to 3" up to "3:30".
So for base β instead of using 'digits' 0 to β−1 we could just as effectively use 'digits' −β/2 to +β/2 if β is odd (rounding the halves). To make sure representations are unique when β is even we can decide to use either −β/2 or else β/2 but not both 'digits'.
Using two symbols for negative digits is inconvenient so to use one single 'digit' per column and we can show negative 'digits' with the negative sign placed above the 'digit' so that −3 is written as 3.
Base −10 using 'digits' 4−10, 3−10, 2−10, 1−10, 0−10, 1−10, 2−10, 3−10, 4−10, 5−10
 0 .. 5: 0−10 .. 5−10 6 .. 15: 14−10 .. 15−10 16 .. 25: 24−20 .. 25−20

 −4 .. −1: 4−10 .. 1−10 −16 .. −5: 24−10 .. 15−10 −26 .. −15: 34−10 .. 25−10
123 is 100 −20 −3 = 77
It is easy to see if a value represented using nega-digits is positive or negative. Show how
If the leftmost 'digit' is positive, the value is positive;
if the leftmost 'digit' is negative, the value is negative
Also, it is easy to negate a value in this system. Show how
Change each positive 'digit' into its negative form and vice-versa.

## Factorial base

Instead of using powers of a number as the column headings, we can use other series of numbers too, for instance the factorials.
The factorial numbers count the number of permutations of n objects.
We can name the objects 1,2,...,n.
So the ways to permute 3 objects (to arrange them all in some order) are: 123, 132, 213, 231, 312, 321.
This is because there are 3 ways to choose the first number, any of the remaining 2 can go next and the 1 value left over goes in the final place, making 3×2×1 permutations. Similar reasoning shows there are 4×3×2×1 permutations of 4 objects. For n objects there are n! = n×(n−1)×...×3×2×1 permutations, called factorial n.
 n n! 1 2 3 4 5 6 1 2 6 24 120 720
These numbers can be used as the columns of a mixed base system, arranging them in reverse order: ..., 5!, 4!, 3!, 2!, 1!. The digits allowed in each column depend on the column number: the first column (1!) is 0,1; the second column (2!) can have digits 0,1 or 2; and in general the n-th factorial column can have 0,1, up to the column number n.
This is because n in column n means n×n! but (n+1)×n! is (n+1)!, which "carries" to the next larger column heading (on the left).
To indicate numbers in this base, we list the "digits" and use the exclamation mark "!" as the base. For example
6 = 1×3! = {1,0,0}!
7 = 1×3! + 1×1! = {1,0,1}!
8 = 1×3! + 1×2! = {1,1,0}!
9 = 1×3! + 1×2! + 1×1! = {1,1,1}!
10 = 1×3! + 2×2! = {1,2,0}!
23 = 3×3! + 2×2! + 1×1! = {3,2,1}!
24 = 1×4! = {1,0,0,0}!
Here are a few numbers in the factorial base:
 n n! 1 2 3 4 5 6 7 8 9 10 11 12 1 10 11 20 21 100 101 110 111 120 121 200

### Easy methods of converting to and from the Factorial Base

To convert a number to base !:

We can adapt the easy method to convert a number to base β above for converting a (decimal) number to base !. This time we start by dividing by 2 and the divisor increases each time.
Here is an example to convert 69 to base !:
 2 69 3 34 rem=1 69 = 2×34 + 1 4 11 rem=1 34 = 3×11 + 1 5 2 rem=3 11 = 4×2 + 3 0 rem=2 2 = 5×0 + 2

To see the base ! representation, write down the reminders from the bottom to the top:
69 = 2311!
To convert a base ! representation to decimal:
1. First write the multipliers above each digit by starting from the right with 2 and proceed leftwards with multipler 3 then 4 and so on. We will not use the leftmost 'multiplier' above the leftmost digit.
2. Start with the most significant digit (the leftmost digit) which is the initial 'sum'
3. Multiply the sum by the next column multiplier on its right ...
4. ... and then add on the 'digit' under that multiplier to make the new 'sum'
5. Repeat the previous two steps of multiplying and adding until you have a 'sum' under the final (rightmost) digit which is the decimal value
For example, using the same numbers as the example above, we have: To convert 2311! to decimal:
 multiplier ! digits sum×multiplier sum 4 3 2 2 3 1 1 8 33 68 2 11 34 69
2311! = 69

### Tests for Divisibility in Base Factorial

Every factorial from n! onwards is a multiple of n.
So to test if any given factorial base representation is divisible by n, we only need to test the number represented by the last n−1 'digits'.
For instance, to test if n! is divisible by 2=2!, look only at the last 'digit'. If it is 0, n is even, divisible by 2; if it is 1, the number is odd.

For divisibility by 3, test only the last 2 'digit's. if they are {1,1}! or {0,0}! then n is a multiple of 3; otherwise it is not.

There are 6 possibilities for the final 3 'digits' to test if a value is a multiple of 4. Show them

0 = {0,0,0}
4 = {0,2,0}
8 = {1,1,0}
12 = {2,0,0}
16 = {2,2,0}
20 = {3,1,0}
For larger divisors d, convert only the final d digits to base 10 and then test.
These divisibility tests are an advantage only if we are dealing with very large numbers and testing for small divisors.

### An Application of Base Factorial

There are n! permutations of n objects. If we label each objects with an index number from 1 to n then we need only consider permutations of the numbers 1 to n to represent the ordering of the objects themselves. Here is a permutation that moves the first object to the 3rd position, the second object becomes the 4th, the third is moved to 2nd place and the fourth take up the 1st place. For example the letters of "arts" under this permutation (where 1="a", 2="r", 3="t" and 4="s") changes it to "star":
 1 2 3 4 a r t s ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 3 4 2 1 s t a r
Note that we could have interpreted this as "1→3; 2→4; 3→2; 4→1" to mean the first object is replaced by the third of the original list so that we begin with "t". Under this interpretation the permutation takes "arts" to "tsra".
But this is not the interpretation we are using here.
We usually just list the new positions as the permutation so the above example is (3412).

The 24 permutations of 4 objects can be listed in lexicographic order which means that the permutations, as numbers, are in numerical order or dictionary or alphabetic order. For instance here is the order of all the permutations of 1,2,3 and 4 sorted into lexicographic (dictionary) order - think of 1 as "a", 2 as "b", 3 as "c" and 4 as "d":

 0: 1,2,3,4 1: 1,2,4,3 2: 1,3,2,4 3: 1,3,4,2 4: 1,4,2,3 5: 1,4,3,2
 6: 2,1,3,4 7: 2,1,4,3 8: 2,3,1,4 9: 2,3,4,1 10: 2,4,1,3 11: 2,4,3,1
 12: 3,1,2,4 13: 3,1,4,2 14: 3,2,1,4 15: 3,2,4,1 16: 3,4,1,2 17: 3,4,2,1
 18: 4,1,2,3 19: 4,1,3,2 20: 4,2,1,3 21: 4,2,3,1 22: 4,3,1,2 23: 4,3,2,1
If we want to choose a random permutation or if we want to make sure we go through all permutations, we need a way of changing the number of the permutation in the lexicographic order to the permutation itself - and this is where base Factorial comes in.
The base factorial representation of an index number n in the lexicographic order is easily changed into the permutation itself.

### Calculator for Factorial Base and Permutations

Factorials are exact up to 500! which has 1135 digits. After that, just the number of digits is shown.
You can use this Calculator to show that the number of digits in 1040! is itself a number with 42 digits(!)
Factorial Base and Permutations C A L C U L A T O R

Number of objects:
 Perm. index #: up to
Permutation:
()

!
R E S U L T S : Factorial Binomial Base converter

### You Do The Maths...

1. Which is the first factorial that is a multiple of
1. 8 ?
2. 17 ?
3. 100 ?
8 = 23 and three 2s come from 2, 4 and 6, so 6! is the first multiple of 8
17 is prime so if first appears in 17!
100 = 22 52 and these factors will come from 2, 4, 5 and 10,so 10! is the first factorial to end with 00.
2. 2! is the first even factorial,
3! is the first facorial divisible by 3
4! is the first divisible by 4 and
5! the first that is a multiple of 5.
Which is the first divisible by 6?
And which factorials are the first divisible by 7, by 8, by 9 and by 10?
3! is the first multiple of 6
7 is a factor first in 7!
8 in 4!
9 in 6!
10 in 5!
The sequence of n where n! is the first divisible by 2,3,4,... is: 2,3,4,5,3,7,4,6,5, ... called the Kempner Numbers A002034
3. How many zeroes are at the end of:
1. 10!
2. 20!
3. 100!
10! = 3628800 = 2×3×4×5×6×7×8×9×10
ends with 2 zeroes
20! = 2×...5×...10×...15×...20×
ends with 4 zeroes
100! has 5 as a prime factor from 5,10,15,20,...90,95,100 and more than enough even numbers to match these.
Each of these 20 numbers has one 5 as a factor except 25, 50, 75 and 100 which have 5×5 as a factor:
20 + 4 = 24 zeroes at the end

## The Binomial Representation using Pascal's Triangle

We can represent every whole number by summing one number chosen from the columns of Pascal's triangle except the column of 1s:
 r … 7 6 5 4 3 2 1 0 n 1 0 1 1 1 1 2 1 2 1 3 3 1 3 1 4 6 4 1 4 1 5 10 10 5 1 5 1 6 15 20 15 6 1 6 1 7 21 35 35 21 7 1 7 ... ⋮
Notation:
 ( n ) = Binomial(n,r) r

 = n! (n-r)! r!

 = n(n−1)...(n−r+1) r(r−1)...3×2×1
Other notations are nCr, nCr or Cn,r and it is pronounced "n choose r".
Each element in Pascal's Triangle above, which is right-justified here, is the sum of the element above and the element to the right of that one where blank entries mean "0". The right-hand elements in column 0 are always being 1:
 ( n ) = ( n − 1 ) + ( n − 1 ) , n ≥ r > 0 r r r − 1

 ( n ) = 1; ( n ) = 0 otherwise 0 r
Pascal's Triangle has many interesting properties including coefficients of certain polynomials and has many applications including probabilites. More...
The entry in column r and row n represents the number of way to choose r things from n where the choice is just a collection. The items have no order within the collection or, alternatively, all orderings of the same items are the same "choice". We say "from n choose r" for nCr = Binomial(n,r). For example to choose 3 people to vote for from 5 candidates:
 5C3 = Binomial(5,3) = 5 × 4 ×3 = 10 3 × 2 × 1
so there are 10 ways to choose the 3 out of the 5 possible choices.
If the 5 candidates are A, B, C, D and E then the 10 ways to choose 3 to vote for are ABC, ABD, ABE, ACD, ACE, ADE, BCD, BCE, BDE, CDE.
• The rows of Pascal's Triangle are the coefficients of (1+x)n, for example n=3:
(1+x)3 = 1 + 3 x + 3 x2 + x3
• Every row is palindromic (the same when reversed). This is because the number of ways to choose r out of n possible is the same as the number of ways to choose (n-r) to leave out of the n possibles.
• The sum of the entries in row r is 2r. This is because each of the n possible objects may be in or out of our choice so we have 2n collections of choices altogether.
• The columns are the coefficients of  1 (1 − x)(r−1)
, for example r=3 use the column headed 2:
 1 = 1 + 3 x + 6 x2 + 10 x3 + ... (1 − x)3
• The probability of getting 0, 1, 2, ... or n heads when n coins are tossed together are shown on row n. For example when n=3:
number of heads0 1 2 3
probability1331
8888
• The basic Recurrence relation uses two consecutive numbers on the row above to make each entry:
Binomial(n,r) = Binomial(n-1, r) + Binomial(n-1,r-1) if r<=n
Binomial(n,1) = 1
Binomial(0,r) = 0 if r is not 0
• The Hockey Stick Theorem
Every number in the triangle is the sum of those on the up-and-right diagonal starting at the number on the row above.
The numbers used make a hockey stick shape, hence the name, and illustrate the equation:
 ( 5 ) = ( 4 ) + ( 3 ) + ( 2 ) + ( 1 ) 3 3 2 1 0

The Hockey Stick Theorem is  r ( n ) = Σ ( n−1−i ) if n>r r r−i i = 0
• Looking into Pascal's Triangle: Combinatorics, Arithmetic, and Geometry P Hilton, J Pedersen Mathematics Magazine vol 60 (1987), pages 305-316 JSTOR
A nice article with lots of formulae that make great investigations for students to discover for themselves
• Sums of Powers J Tanton Math Horizons vol 11 (2003), pages 15-20 JSTOR
Another excellent article for teachers and others

To use these numbers as an integer representation method, there is a separate representation for the N columns ending at column 1 ignoring the column of 1s, column 0. So we first decide on the number columns we want to use. We choose one element from each column as the representation of their sum.
There are several ways to do make the same total usually, so, to make the representation unique as we go to a smaller column number, we must choose an entry with a smaller row number than the ones before. It is the row number for each of the columns that forms the representation.
This means that a Binomial representation is a list of descending (row) numbers.
Because the representation will change depending on how many columns we use, the Base is shown as Binn where n is the number of columns used.
Each column beyond column 0 starts with a blank entres which represent 0.
Then, using columns N down to 1, every integer has just one representation as a sum of N binomials with the "descending entries" condition.

Binomial Base numbers are shown with the row numbers as 'digits' in columns ..., 3, 2, 1 so that the 'digits' will always decrease. The number r in column c represents the value Binomial(r,c) as defined above.
The sum of these binomials gives the integer represented in the Binomial base.
For example, using columns 3,2 and 1 we can choose one from each column to make a total of 6 as follows:

6 using 3 columns of Pascal's Triangle is Binomial(4, 3)+Binomial(2, 2)+Binomial(1, 1) =
 3 2 1 { 4, 2, 1 }Bin3

{4,2,1} = 4+1+1 = 6
{4,0,2} = 4+0+2 = 6
Similarly choosing other numbers from those three columns, we have
{3,3,2} = 1+3+1 = 6
but only the first has descending row numbers 4, 2, 1 and so is the true Binomial representation of 6 = {4,2,1}Bin3.
With other numbers of columns we have:
6 = {6}Bin1
6 = {4,0}Bin2
6 = {4,2,1}Bin3
6 = {5,3,1,0}Bin4
6 = {6,3,2,1,0}Bin5
...
but for a fixed number of columns there is one one way to choose the rows so that the elements sum of any given number.

### Calculator for Binomial Representations

Binomial Representations C A L C U L A T O R
 ( n: r: )
10
up to: 10

Bin
R E S U L T S : Factorial Binomial Base converter

### You Do The Maths...

1. What are these numbers in base 10:
1. {1}Bin1
2. {2,1}Bin2
3. {3,2,1}Bin3
4. {4,3,2,1}Bin4
What is {N, N-1, ... , 3, 2, 1}BinN?
2. What is {n, 0}Bin2 in base 10?
3. Using your answer to Question 1 what is {N+2, N+1, N-2, N-3, ... , 2, 1, 0}BinN where the 'digits' from N-2 descend by 1 to end at 0?
1. How is {n, n-1}Bin2 related to {n+1, 0}Bin2?
2. How is {n, n-1, n-2}Bin3 related to {n+1, 1, 0}Bin3?
3. Does this generalise and if so why? (The Hockey Stick Theorem)
4. What is {n,0}Bin2 + {n-1,0}Bin2?
• The Art of Computer Programming Vol 4a: Combinatorial Algorithms Part 1 D E Knuth. Page 360 refers to the Binomial representation system using t columns as the Combinatorial Number system of degree t and the following reference...
• Ernesto Pascal, Giornale di Matematiche vol 25 (1887), pages 45-49 (in Italian).
• Representation of Numbers by Cascades C C Chen, D E Daykin, Proceedings of the American Mathematical Society (Vol 59, 1976), pages 394-398. JSTOR

## The Fibonacci Bases

The Fibonacci Numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, ... where each is the sum of the previous two numbers.
It has many interesting mathematical properties.
As a number base system, we again label the columns in order increasing to the left: 8, 5, 3, 2, 1 with just a single column labelled 1 so we only use Fibonacci numbers with index 2 or more beause Fib(2)=1, Fib(3)= 2, ... .
Every whole number is a sum of Fibonacci Numbers
We can use F to signify a representation using the Fibonacci numbers as column headers.

3 = 100F = 2 + 1 = 11F
Since Fib(1) is 1, we can simply use n Fib(1)'s to sum to any given number n.
But there is always another way to do this too for numbers bigger than 1.
If we write the number of times we need Fib(i) is column i, we have a number representation whose 'digits' are any whole number.

### The minimal and maximal Fibonacci bases

However, if we restrict ourselves to using each Fibonacci number at most once then it is again possible to find a collection which is a set of Fibonacci numbers whose sum is any given integer.
Two in particular are of interest: since Fib(n-1) + Fib(n-2) = Fib(n), then any two consecutive 1s in a Fibonacci representation can be "carried" into the next column. It turns out it is always possible to find a set of Fibonacci numbers with any given sum that
• either never have two consecutive 1's - so we use the smallest set of Fibonacci numbers - the minimal Fibonacci representation or Zeckendorf representation, which we write as Fmin
• or never have two consecutive 0s - se we use the largest set of Fibonacci numbers - the maximal FIbonacci representation which we write as Fmax
For example:
8 = Fib(6)
= 10000Fmin
= Fib(5) + Fib(4) = 1100F
= Fib(5) + Fib(3) + Fib(2) =1011Fmax
Here are all the FIbonacci representation for numbers 1 to 9:
Columns in the Fibonacci base as ..., 8, 5, 3, 2, 1
 n nF 0 1 2 3 4 5 6 7 8 9 0 1 10 10011 101 1000110 1001111 1010 1000011001011 100011101

### To convert to and from Fibonacci bases

There are usually many Fibonacci representations of a number using only the 'digits' 0 and 1 in every column and with the column headings (in reverse order): 1, 2, 3, 5, 8, 13, 21, ...
An easy method of converting a number to base F will give the Zeckendorf represenation which happens to have the last number of 1s in any of the many representations for the number.
1. Write the Fibonacci column headings, in order from right to left, from 1,2,... until the column headings are larger than the value to be converted
2. Start by writing the decimal number to be converted above the leftmost column header
3. If the column heading is larger than the number, put a 0 in that column and keep the number to use on the next column on the right; Otherwise if the column header is not larger than the number, Subtract the column header value from the number and write a 1 in the column
4. repeat the step above on the same or, if you did the subtraction, the reduced decimal number
5. after the rightmost column you should have reached 0.
6. Each column now has a 0 or 1 in it which is the Fibonacci (Zeckendorf) representation
For instance here we convert 52 to base Fibonacci:
 A: number B: Fib colheading F digit 52 18 18 5 5 0 0 0 55 34 21 13 8 5 3 2 1 A-B or A 18 18 5 5 0 0 0 0 1 0 1 0 1 0 0 0
52 = 10101000F
To convert from base Fibonacci, write the column headings above the digits and add the column headings above each digit '1'.

## Rational Bases

Up to now we have only used whole numbers as our 'column headings' but always our 'digits' are whole numbers.
It is also possible to use column headings based on powers (a radix system) where the base is not a whole number but a fraction (a rational) such as 3/2.
In base β, an integer, when we add 1 to the units column and find a value equal to β, we take β away and add one (the carry) to the next column to the left.
In a rational base, say 3/2, when we find 3 in any column we carry 2 to the column to the left. This applies to any rational number β bigger than 1.

The 'digits' in rational base m/n are the digits of base m, namely 0 to m−1.

 1 = 13/2 15/2 15/3 2 = 23/2 25/2 25/3 3 = 203/2 35/2 35/3 4 = 213/2 45/2 45/3 5 = 223/2 205/2 305/3 6 = 2103/2 215/2 315/3 7 = 2113/2 225/2 325/3 8 = 2123/2 235/2 335/3 9 = 21003/2 245/2 345/3 10 = 21013/2 405/2 3105/3 11 = 21023/2 415/2 3115/3 12 = 21203/2 425/2 3125/3
For rational base β less than 1 (but bigger than 0), reverse the digits of the representation in base β remembering to include the radix point. This is because (β)n is (1/β)−n. For example:
12 = 3125/3 = 2.133/5

Use the Base Converter below to convert to and from rational bases.

## Irrational Bases

But what if our column headings were powers not of a whole number nor even a rational number but of an irrational number, such as Phi, the golden section number or √2? This also works with some conditions on the base and the 'digits'.
Let's look at an example: base Phi.

### Base Phi (Φ) and base phi (φ)

Phi is 1.6180339... = (√5 + 1)/2, one of the golden section numbers (or golden mean or golden ratio).
Because Phi2 = Phi + 1 is a definition of the positive number Phi, we only need "digits" 0 and 1, called "phigits"!
The basic Phi rule is Phin+2 = Phin+1 + Phin
All natural numbers are representable in Base Phi using phigits 0 and 1 but we will need negative powers and so we need a "base point" to act like the decimal point in base 10.
Just as for Fibonacci base numbers above, we need never have two 1's next to each other since they combine to give a 1 in the next column to the left using the basic Phi rule.
Here Phi = 1·6180339... = phi–1
and phi = 0·6180339... = Phi – 1 = 1/Phi = Phi–1
Column Phi
power
phi
power
A + B Phi C + D phireal
value
5Phi5 phi-5 3 + 5 Phi 8 + 5 phi 11·0901699..
4Phi4 phi-4 2 + 3 Phi 5 + 3 phi 6·8541019..
5Phi3 phi-3 1 + 2 Phi 3 + 2 phi 4·2360679..
2Phi2 phi-2 1 + 1 Phi 2 + 1 phi 2·6180339..
1Phi1 phi-1 0 + 1 Phi 1 + 1 phi 1·6180339..
0Phi0 phi0 1 + 0 Phi 1 + 0 phi 1·0000000..
-1Phi-1 phi1 -1 + 1 Phi 0 + 1 phi 0·6180339..
-2Phi-2 phi2 2 - 1 Phi 1 - 1 phi 0·3819660..
-3Phi-3 phi3 -3 + 2 Phi -1 + 2 phi 0·2360679..
-4Phi-4 phi4 5 - 3 Phi 2 - 3 phi 0·1458980..
-5Phi-5 phi5 -8 + 5 Phi -3 + 5 phi 0·0901699..
For instance 2 is 10.01Phi = Phi + Phi−2.
 1 1 . Phi 2 10 . 01Phi 3 100 . 01Phi 4 101 . 01Phi 5 1000 . 1001Phi 6 1010 . 0001Phi 7 10000 . 0001Phi 8 10001 . 0001Phi 9 10010 . 0101Phi 10 10100 . 0101Phi 11 10101 . 0101Phi 12 100000 . 101001Phi 13 100010 . 001001Phi
phi = 1/Phi = Phi-1 = 0.6180339... = (√5-1)/2 and the basic phi rule is phin = phin+1 + phin+2.
Because Phi−n = phin it is easy to see that to get a base phi representation from a base Phi representation we merely reverse the order of the phigits including the base point:
4 = 101.01Phi = 10.101phi
6 = 1010.0001Phi = 1000.0101phi

### More on base Phi

• A Number System with Irrational Base, George Bergman, Mathematics Magazine 1957, Vol 31, pages 98-110, where he also gives pencil-and-paper methods of doing arithmetic in Base Phi. • C. Rousseau The Phi Number System Revisited in Mathematics Magazine 1995, Vol 68, pages 283-284.

### Other irrational bases: √n

If n is not a square number then the even powers of √n are just the powers of n so base √n includes all the representations of integers in base n.
 ... β6 β5 β4 β3 β2 β1 β0 ... n3 n5/2 n2 n3/2 n n1/2 1 ... n3 n2√n n2 n√n n √n 1
The table shows that the √n values are in the odd-power places and the purely integer values are in the even-power places.
Because √n is itself not rational, the only values we can represent in base √n are A + B√n for whole numbers A and B.
If we represent A in base n then shifting all its digits one place left will effectively multiply the value by the base, √n. So any value A √n will only have non-zero digits in the even-power places and always 0s in the odd-power places. We can then 'add' in the digits of B in base √n which similarly will have only 0s in the odd-power places and any non-zero digits will be in even-powered places.
5 = 1012 and 9 = 10012
5 = 10001√2, 5√2 = 100010√2 and 9 = 1000001√2
9 + 5√2 = 1100011√2

## Base Converter

In a number is written in a base (β) which is bigger than 10, we cannot tell if 11β means 11×1 = 11 or if it represents 1×β+1 = β + 1.
Often new "digits" are used which conventionally are letters so that the "digit" 10 is A, 11 is B, ..., 35 is F.
The digits in increasing order from 0 to 35 are therefore 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ. This is called the "9A" format on this page.
But for bases beyond 36 we need even more new "digits"!
An alternative is to list the decimal values of every column, enclosed in {} brackets so that 13 = {1,3}10 = {1,1}12 and 11 = {1,1}10 ={11}12. This is called the "{}" format on this page.

• Numeric bases
• Bases can be any integer, positive or negative except -1, 0 and 1
• fractional bases are N/M where N and M are whole numbers and N/M
In this Calculator, they cannot be converted to other bases if they do not represent a whole number.
• Output formats
• bases from 11 to 36 can use either the 9A format or else the {} style
• all bases above 36 or below -36 use the {} style
• bases -10 up to 10 use the "normal" style of writing numbers (the 9A format)
• a negative base -β uses the same "digits" as base β where β is any positive integer
• Non-numeric bases:
• Bases recognized are F = Fmin, Fmax, Phi = Phimin, Phimax, ! and BinN where N is a whole number
• A 'decimal point', called a radix point in bases other than 10, is only allowed for bases Phi, phi and rational bases.

### Base Converter Calculator for Integers

Base Converter C A L C U L A T O R
Allow any 'digit':
 from base to base
 from 10 to 10 converted to bases

R E S U L T S Format base 11-36 numbers as : Factorial Binomial Base converter

## Complex Number Bases

We can again extend our possible bases in a radix system to complex numbers and find a unique way to represent integers and other values.
...... more coming soon .....

## The Chinese Remainder Theorem Number Base

This is a system which has many computational advantages, particularly for computers than can run parts of a computation in parallel since each digit is independent of the others.
.... coming soon ..... © 2018 Dr Ron Knott Dr Knott's Maths Fibonacci and HOME page