# Introduction to Number Bases with worked examples

### Introduction to Number Bases:

Numbering begins with 0 (zero). Also, numbers are expressed in bases (sometimes called radix). A base 10 number for instance will comprise of 10 digits ranging from 0 – 9.

Note: We generally use base 10 in our numbering system.

Base 10 digits will comprise of: 0 1 2 3 4 5 6 7 8 9

Since the above numbers are composed of 10 digits, Base 10 may be referred to as decimals or denary digits.

The table below illustrates base 10 digits:

#### Apart from base 10 (Decimal), we do have other bases like:

Base 2 also called Binary: consists of 2 digits which are 0 and 1

Base 3 also called Ternary: consists of 3 digits which are 0, 1 and 2

Base 4 also called Quaternary: consists of 4 digits which are 0, 1, 2 and 3

Base 5 also called Quinary: consists of 5 digits which are 0, 1, 2, 3 and 4

Base 6 also called Senary: consists of 6 digits which are 0, 1, 2, 3, 4, 5 and 6

Base 7 also called Septenary: consists of 7 digits which are 0, 1, 2, 3, 4, 5, 6 and 7

Base 8 also called Octal: consists of 8 digits which are 0, 1, 2, 3, 4, 5, 6, 7 and 8

Base 9 also called Nonary: consists of 9 digits which are: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9

Note: When we have a base number greater than 10; for instance base 11 or base 12 or base 13 and so on, the next digit will be an alphabet in its ascending order. Let see the examples below:

Base 11 also called Undecimal: consists of 11 digits which are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A

Base 12 also called Duodecimal: consists of 12 digits which are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B

The digits for base 16 (Hexadecimal digits) are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

With regards to base 2, it will comprise of only 2 digits which are 0 and 1. Because we have just 2 digits here, base 2 is often referred to a binary digit. Binary digits are fundamental to how computers work. This is why you may see stuffs like "01001100101011011" in a programming or computer language. Remember, we have just two digits in binary and that’s 0 and 1. The table below shows what base 2 would look like

 Base 1 Base 2 Summary 0 All base digits starts at 0 1 1 Next digit is 1. Base 2 digit ends with 1 11 10 We start at zero again, but add 1 to the left 111 11 We will add 1 digit to the right 1111 100 Since the above digits is all 1’s and base 2 ends with digit 1, we will change all the 1’s to 0’s and add 1 to the left 11111 101 We will add one to the farthest 0 at the right

Note: Understanding base 2 is very vital for IP addressing in computer networking.

Ternary or Base 3 comprise of 3 digits which are 0, 1 and 2. The table below shows what base 3 would look like

 Unary/Base 1 Base 3 Summary 0 All base digits starts at 0 1 1 Next digit is 1. 11 2 Next digit is 2. Base 3 digit ends with 2 111 10 We will start back at 0 and add 1 to the left 1111 11 Next digit is 1 from the right 11111 12 Next digit is 2 from the right 111111 20 We will start back at zero and add one to the left 1111111 21 We will add 1 to the right 11111111 22 We will add 1 to the right 111111111 100 Since the above digits is all 2’s, we will change all  the 2’s to 0’s and add 1 to the left 1111111111 101 We will add 1 to the farthest right

The table below shows a summary of base 10, base 2, base 6, base 11 and base 16

 Unary Base 10 Base 2 Base 6 Base 11 Base 16 1 1 1 1 1 1 11 2 10 2 2 2 111 3 11 3 3 3 1111 4 100 4 4 4 11111 5 101 5 5 5 111111 6 110 10 6 6 1111111 7 111 11 7 7 11111111 8 1000 12 8 8 111111111 9 1001 13 9 9 1111111111 10 1010 14 A A 11111111111 11 1011 15 10 B 111111111111 12 1100 20 11 C 1111111111111 13 1101 21 12 D 11111111111111 14 1110 22 13 E 111111111111111 15 1111 23 14 F 1111111111111111 16 10000 24 15 10

Notice that we skipped the zero (0) value in the above table.

In order to convert a base to another base (e.g from base 10 to base 2), we will need to know the powers of the base we are converting to. We must start from power 0 since our numbering always start from zero (like I wrote at the beginning of this article). For instance:

The powers of 2 are:

2 raised to power 0 = 1. (That is; 20 = 1)

2 raised to power 1 = 2. (That is; 21 = 2) or (2 x 1 = 2)

2 raised to power 2 = 4. (That is; 22 = 4) or (2 x 2 = 4)

2 raised to power 3 = 8. (That is; 23 = 8) or (2 x 2 x 2 = 8)

2 raised to power 4 = 16. (That is; 24 = 16) or (2 x 2 x 2 x 2 = 16)

2 raised to power 5 = 32. (That is; 25 = 32) or (2 x 2 x 2 x 2 x 2 = 32)

And so on.

Note: Any value raised to the power of zero will always equal to 1.

Simply put, the power of 2 can be written as:

1, 2, 4, 8, 16, 32, 64, 128, 256 and so on.

Following the same steps as above, the power or 3 will be:

1, 3, 9, 27, 81, 243, 729 and so on

Still following the same steps as above, the powers of 4 are

1, 4, 16, 64, 256, 1024 and so on

#### Worked Example 1

• Convert the decimal 10 to base 2

Step 1: We need divide the decimal number by the base we want to convert to.

• decimal value = 10
• we are converting to base 2
##### 10/2 = 5 Remainder 0

Note: We must take into account the remainder from our division because it will be used as our answer. Every other step will be similar to step 1 but we will divide our resultant answer from the subsequent steps.

Step 2: Our previous answer from the above division was 5.

##### 5/2 = 2 Remainder 1

Step 3: Our previous answer from the above division was 2.

##### 2/2 = 1 Remainder 0

Step 4: Our previous answer from the above division was 1.

##### 1 divided by 2 = 0 Remainder 1

Once our division equals 0, we are done.

Next is to write the reminder from bottom - top; and that’s our answer.

OR

#### We can also solve this question by using a table, where we will divide the decimal number by the base we want to convert to:

 Base 2 Decimal value Remainder 2 10 - 2 5 0 2 2 1 2 1 0 2 0 1

Counting our remainder from below;

Note: I will use different expressions for the questions below but they will all mean the same thing. (We will be converting a number from base 10 to another base).

Worked Example 2

• Convert 15 to base 2

For simplicity, we will use a table to solve this question.

 Base 2 Decimal value Remainder 2 15 - 2 7 1 2 3 1 2 1 1 2 0 1

Counting our remainder from below;

Worked Example 3

• Convert 16 to 164
 Base 4 Decimal value = 16 Remainder 4 16 - 4 4 0 4 1 0 4 0 1

Counting our remainder from below;

Worked Example 4

• Convert 1610 to base 1616
 Base 16 Decimal value = 16 Remainder 16 16 - 16 1 0 16 0 1

Counting our remainder from below;

We will advance on this topic on another article.

Alfred Ajibola is a Medical Biochemist, a passionate Academician with over 7 years of experience, a Versatile Writer, a Web Developer, a Cisco Certified Network Associate and a Cisco CyberOps Associate.