nav.gif (1245 bytes)mathematics

Ken Ward's Mathematics Pages

Number Theory Number Base Systems

Number Theory Contents

Page Contents

  1. Number Representation System
  2. Basic Idea
  3. Converting Whole Numbers in Base 10 to Another Base
  4. Converting a Number in Base b to a Decimal Number
  5. Converting a Fraction in Base 10 to Base b
  6. Converting a Fraction Base b to Base 10

Number Representation System

Basic Idea

We represent our base 10 numbers, such as 201 in the following way:rep1.gif [1.1]

So that each digit is in 0..9, and its position determines which power of 10 we need to multiply it by. Two important symbols in our decimal system are 0, which has been used extensively only in the last few hundred years in Europe, and ".", the decimal point which marks the whole numbers from the fractions (something which was absent in the Babylonian system, and which causes some confusion.. when, for instance, we cannot distinguish 0.25 and 25!)

In general, we represent the whole numbers in our base 10 system in the following way:
rep2.gif [1.2]
Where a is a number, such as 201, and the a's with subscripts are numbers between 0 and 9.

Generalising even further, we can represent numbers in the base, b, as follows:
rep3.gif [1.3]

If we divide a number a, by b continuously, we find that the remainders of division are the digits of our new number base b.

When converting from one base to another (excluding base 10) we need to do arithmetic in a base other than ten. For this reason it is better to convert from one base to another through the intermediary of base 10; that is, we convert one number in base b1 into base 10 and then from base 10, we convert the number to b2.

Converting Whole Numbers in Base 10 to Another Base

We can convert a number in base 10 to another base system by repeatedly dividing the number by b, the new base.
For instance, we wish to convert 10 in base 10, to a number in base 3.
Convert 10, base 10 to base 3
Number of 3'sRemainder
10=3•3+1
3=3•1+0
1=3•0+1

We read off the new number, base 3 from the remainders: [1,0,1], or 1013. So 10 in base 10 is 101 in base 3.

Remark, we could have noticed that because the 1 in the last but one line is less than 3, we could have read the number off beginning with this obvious next remainder, and the other remainders: 101, base 3.

As a second example, we can convert 102 in Base 10 to Base 16 (or hexadecimal).
Convert 102, base 10 to base 16
Number of 3'sRemainder
102=16•6+4
6=16•0+6

Reading off the remainders, we note that 10210=6416

Converting a Number in Base b to a Decimal Number

A number, such as 101 in base 2 can be thought of as 12011, where the superscripts are reminders that in the position to the right of the index, the number in base 10 is that number times that power of two. That is:
12011=1•4+0•2+1=6.

And for 64 in base 16:
6140=6•16+4•160=100, base 10
And 101, base 3 gives:
120110=1•32+0•31+1•30=10, base 10

Converting a Fraction in Base 10 to Base b

A decimal fraction such as 0.102, can be written in terms of negative powers of 10:
rep4.gif [2.1]

In general, a fractional number, a, in base b can be written:
rep5.gif [2.1]
In decreasing powers of ten, with the first position being 10-1.

Or, alternatively written as:
rep6.gif [3.2]
In converting a decimal in base 10 to a fraction in base b, we do the opposite of converting  the whole numbers: we multiply the number in base 10 by b repeatedly, and our remainder is the integer part of the resulting number.

For instance, 0.5 in base 10 is 4•0.5=2, or 0.5 in base 4 is 0.2 in base 4

Convert 0.5 Base 10 to Base 4
Integer, Number of 4'sFraction
0.5•420
0.5 in base 10 is 0.2 in base 4 )

Convert 0.5 Base 10 to Base 3
Integer Number of 3'sFraction
0.5•3=1.5
0.5•3=1.5

0.510 in base 3 is therefore 0.111...3.

Convert 0.16 Base 10 to Base 8
Integer, Number of 8'sFraction
0.16•8=1.28
0.28•8=2.24
0.24•8=1.92
0.92•8= 7.36
0.36•8= 2.88
0.88•8= 7.64

0.16 base 10 is 0.121727... base 8

Converting a Fraction Base b to Base 10

To convert a fraction base b, to base 10, we recall:
rep6.gif [3.2, repeated]

For instance, 0.2 in base 4 is 2/4 in base 10, or 0.5.

Another example:
0.121727 in base 8 is (to base 10) is, by spreadsheet:
Number Part Result of: Dividing by  divisor on the left is 8 to the power)
1 0.125 8 1
2 0.03125 64 (82) 2
1 0.0019531 512 (83 ) 3
7 0.001709 4096 (84 ) 4
2 6.104E-05 32768(85 ) 5
7 2.67E-05 262144(86 ) 6
0.1217278= 0.160000 ( to 6 decimals)













Ken Ward's Mathematics Pages


Faster Arithmetic - by Ken Ward

Ken's book is packed with examples and explanations that enable you to discover more than 150 techniques to speed up your arithmetic and increase your understanding of numbers. Paperback and Kindle:
Buy now at Amazon.com
Faster Arithmetic for Adults