Navigation 
 Home 
 Search 
 Site map 

 Contact Graeme 
 Home 
 Email 
 Twitter

 Skip Navigation LinksMath Help > Basic Math > Arithmetic Rules > Number Bases

What is a base?

Using "place value" a number is formed from a small number of symbols, 0, 1, 2, etc. up to one less than the "base".  In the base 10 number system, which is our standard system, the symbols range from 0 to 9.  To write "10", we use the 1 again, and move it one place to the left, so it has a "place value" of 10.

The smallest base that is in ordinary use is 2.  In this system, called the "binary" system, the only symbols that are used are 0 and 1.  The place value increases as you move left not by powers of 10, but by powers of 2.  So 102 = 2, 1002 = 4, 10002 = 8, etc.

Adding in other bases

The rules of addition in other bases are similar to those for base 10, but you have to "think in the base" you are using.  That means, for example, if you are using base 7, you have to remember that 4+5=12, so you write the "2" and carry the "1".

Non-integer bases

Though very foreign to our ordinary way of thinking, there's nothing in theory that prevents a number base from being a number other than an integer, or even irrational.

The golden ratio, represented by the Greek letter, φ (phi), is equal to (sqrt(5)+1)/2.  This number makes a very interesting base because of this special property:

φ2 = φ + 1, which means 100φ = 011φ and 0200φ = 1001φ.  These two rules can be applied in either direction against any sequence of consecutive digits in a base-φ number to put it in "standard form", which means no digits other than 0 or 1, and no two 1's in a row.  In addition, the repeating decimal 0.101010... is equal to 1.

100φ = 011φ 

This relation can be applied anywhere in a base-φ number to handle most "carries" when adding.  So, for example,

  111.111
 +111.111
 --------
  222.222

is the result after doing the addition, but the "2" digits in the result aren't considered "normal form", so they must be reorganized into zeros and ones by "carrying" the digits to the left.  Unlike integer base arithmetic, in which digits need to be carried only to the next column, in base-φ, we have to carry two non-zero digits two places to the left using the identity 100φ = 011φ.   Here's how that looks:

  111.111
 +111.111
 --------
  222.222, and then process the "carries" this way:
  222.311
  223.201
  232.101
  321.101
 1211.101
10111.101

0200φ = 1001φ

Does this always work?  No, we have a problem if we encounter an "02" pattern.   One way to handle it is to carry one digit to the left, and one digit two places to the right, so 02.00 becomes 10.01.  Then we might have another problem if the "rightbound carry" lands on a digit that's already one, because we might have to carry a digit two more places to the right.  Here's an example where this comes up:

  10100
 +10101
 --------
  20201, and then process the "carries" this way:
  21002
  21010.01
 110010.01

"Standard Form" of a number, base φ

In standard form, an integer has only 1's and 0's, and no two 1's are consecutive.

In addition, the repeating decimal, 0101010... should be eliminated by rewriting it as 1.  To understand why 1 = φ-1-3-5+..., read this:

let s = φ-1-3-5+...
then φ2s = φ+φ-1-3-5+...
so (φ2-1)s = φ, and since φ2-1 = φ, it follows that s=1.

The "greedy algorithm" for converting a positive integer, n, starts with the highest power of φ that doesn't exceed n, writing a "1" in that place, and continuing down until the number, base φ, is exactly equal to n.  Note that using the greedy algorithm, there will never be two consecutive 1's, because the greedy algorithm would have chosen a 1 in the place to the left of the two 1's.

1. To convert an integer x to a base-φ number, note that x = (x + 0φ). 
2. Subtract the highest power of φ, which is still smaller than the number we have, to get our new number, and record a "1" in the appropriate place in the resulting base-φ number. 
3. Unless our number is 0, go to step 2. 
4. Finished. 

The "least greedy" algorithm is strikingly similar to the greedy algorithm.  In this algorithm, a 1 isn't placed in the number unless absolutely necessary.  It's only necessary to put a 1 into the number if 011111... would not be large enough.   The number 011111... is φ times 100000..., so this is the criterion for deciding whether to write a 1.  The least greedy algorithm works this way:

1. To convert an integer x to a base-φ number, using the least greedy algorithm, 
2. Find the highest power of φ, which is still smaller than the number we have, and subtract the next-higher power of φ to get out new number, and record a "1" in the appropriate place in the resulting base-φ number. 
3. Unless our number is 0, go to step 2. 
4. Finished. 

This algorithm, as written, will never finish, because all integers coded with the "least greedy" algorithm end in a never ending sequence of 101010...

Table of integers in base φ

n n, base φ (greedy algorithm) -- A105424 n, base φ (least greedy algorithm) -- A118240
110.101010...
210.011.101010...
3100.0110.11101010...
4101.0111.11101010...
51000.1001101.11101010...
61010.0001111.01101010...
710000.00011010.1011101010...
810001.00011011.1011101010...
910010.01011101.1011101010...
1010100.01011110.1111101010...
1110101.01011111.1111101010...
12100000.10100110101.1111101010...
13100010.00100110111.0111101010...
14100100.00100111010.1101101010...
15100101.00100111011.1101101010...
16101000.10000111101.1101101010...
17101010.00000111111.0101101010...
181000000.000001101010.101011101010...
191000001.000001101011.101011101010...
201000010.010001101101.101011101010...
211000100.010001101110.111011101010...
221000101.010001101111.111011101010...
231001000.100101110101.111011101010...
241001010.000101110111.011011101010...
251010000.000101111010.101111101010...
261010001.000101111011.101111101010...
271010010.010101111101.101111101010...
281010100.010101111110.111111101010...
291010101.010101111111.111111101010...
3010000000.101010011010101.111111101010...
3110000010.001010011010111.011111101010...
3210000100.001010011011010.110111101010...
3310000101.001010011011011.110111101010...
3410001000.100010011011101.110111101010...
3510001010.000010011011111.010111101010...
3610010000.000010011101010.101101101010...
3710010001.000010011101011.101101101010...
3810010010.010010011101101.101101101010...
3910010100.010010011101110.111101101010...
4010010101.010010011101111.111101101010...
4110100000.101000011110101.111101101010...
4210100010.001000011110111.011101101010...
4310100100.001000011111010.110101101010...
4410100101.001000011111011.110101101010...
4510101000.100000011111101.110101101010...
4610101010.000000011111111.010101101010...
47100000000.0000000110101010.10101011101010...
48100000001.0000000110101011.10101011101010...
49100000010.0100000110101101.10101011101010...
50100000100.0100000110101110.11101011101010...
51100000101.0100000110101111.11101011101010...
52100001000.1001000110110101.11101011101010...
53100001010.0001000110110111.01101011101010...
54100010000.0001000110111010.10111011101010...
55100010001.0001000110111011.10111011101010...
56100010010.0101000110111101.10111011101010...
57100010100.0101000110111110.11111011101010...
58100010101.0101000110111111.11111011101010...
59100100000.1010010111010101.11111011101010...
60100100010.0010010111010111.01111011101010...
61100100100.0010010111011010.11011011101010...
62100100101.0010010111011011.11011011101010...
63100101000.1000010111011101.11011011101010...
64100101010.0000010111011111.01011011101010...
65101000000.0000010111101010.10101111101010...
66101000001.0000010111101011.10101111101010...
67101000010.0100010111101101.10101111101010...
68101000100.0100010111101110.11101111101010...
69101000101.0100010111101111.11101111101010...
70101001000.1001010111110101.11101111101010...
71101001010.0001010111110111.01101111101010...
72101010000.0001010111111010.10111111101010...
73101010001.0001010111111011.10111111101010...
74101010010.0101010111111101.10111111101010...
75101010100.0101010111111110.11111111101010...
76101010101.0101010111111111.11111111101010...
771000000000.1010101001101010101.11111111101010...
781000000010.0010101001101010111.01111111101010...
791000000100.0010101001101011010.11011111101010...
801000000101.0010101001101011011.11011111101010...
811000001000.1000101001101011101.11011111101010...
821000001010.0000101001101011111.01011111101010...
831000010000.0000101001101101010.10110111101010...
841000010001.0000101001101101011.10110111101010...
851000010010.0100101001101101101.10110111101010...
861000010100.0100101001101101110.11110111101010...
871000010101.0100101001101101111.11110111101010...
881000100000.1010001001101110101.11110111101010...
891000100010.0010001001101110111.01110111101010...
901000100100.0010001001101111010.11010111101010...
911000100101.0010001001101111011.11010111101010...
921000101000.1000001001101111101.11010111101010...
931000101010.0000001001101111111.01010111101010...
941001000000.0000001001110101010.10101101101010...
951001000001.0000001001110101011.10101101101010...
961001000010.0100001001110101101.10101101101010...
971001000100.0100001001110101110.11101101101010...
981001000101.0100001001110101111.11101101101010...
991001001000.1001001001110110101.11101101101010...
1001001001010.0001001001110110111.01101101101010...

Teaching Integers in φ-land

Imagine how hard it would have been to teach children to add integers if we had arbitrarily chosen φ as our number base instead of 10. The explanation would go something like this:

"Now, children, pay attention. As we learned yesterday, φ+1=φ*φ, so 100 = 11, and that's true even in the φ-imal places.  So another name for 1.00 is 0.11.  I hope you have all memorized that by now because it is very important in today's lesson.  Now, to add 1+1, write one of the 1's as 0.11, to avoid having to carry -- sorry, 'regroup' [the 'new math' has made it to φ-land] -- so you add 1+1 this way:

      1.00
     +0.11
    ------
      1.11 (Two)

We have a special name for this number.  Two.  Everyone say it with me, Twooooo, that's right.  Is this clear to everyone?  Now, let's see about the next integer.  What's 1+Two?  Time to regroup!  You remember from yesterday that 11=100, right?  So obviously 110=1000, because you can multiply both numbers by φ.  Then add 1 to both numbers, and you get 111=1001.  Then just rewrite 1+1=1.11 as 1+1=10.01, just another way of writing Two.  And then you can add 1 yet again, like this.  Here's 1+Two:

      1.00
    +10.01 (Two)
   -------
     11.01 (Three)

I have eyes in the back of my head, Jimmy!  This is important, now, so look closely.  You need to understand regrouping if you ever hope to learn about the integers!  Now, Two+Two has another special name, does anyone know it?  Four!  That's right.  Now, since Two is 1.11 and it's also 10.01, we can add them up to make Four.  Uh-oh.  We have a collision in the φ-Two place.  We have to regroup again using the same trick: 1.11 is the same as 1.1100, which is the same as 1.1011.  Do you see how I took the last '100' and turned it into '011'? Let me write it on the board.

      1.1011 (Two)
    +10.0100 (Two)
   ---------
     11.1111 (Four)

Do you all see how regrouping works in this addition problem?  (chirp, chirp...)  Anyone?  OK, I'll do it again, but watch me this time.  We have a lot of numbers to get through before we've completed are addition table!  Then, for homework, I want you all to study the number Five.  That's 1 plus Four, and it's also Two plus Three.  Good luck, children!"

Internet references

Wikipedia, Golden Ratio Base

Mathworld, Base and Phi Number System

Related pages in this website

The golden ratio


The webmaster and author of this Math Help site is Graeme McRae.