# Number and Number Systems

A number system is a way to represent numbers.

Ten is an important number for us humans. Most of us have ten of fingers and toes, and we certainly prefer to have all ten of each. Because the fingers are convenient for counting, people started using their fingers to count from 1 to 10. It is decimal system, which is also called base-10 number system. Even if a lot of number systems are in base 10, human did not always count in base 10 and we are still using other numeral bases. Here are few examples:

• Base-60 counting system is still used today with this "60 seconds in a minute; 60 minutes in a hour".
• Base-24 system is used for counting 24 hours to be one day.
• Base-12 system is used for counting one dozen.

Figure 1: Ten fingers on two hands, the possible starting point of the decimal counting

If humans had 6 fingers on their hands, would we be using the Senary system (also known as heximal or Seximal) of numbers?

In a digital system, each digit (bit, wire) has only two possible values: 0 or 1. It is called Binary, or base-2 number system. If there is a longer binary number, for example: (101110100101)binary, it is not suitable for humans to remember it, and it is easily confused. One good way reducing the length of binary number is grouping consecutive binary digits into groups of other number system. Therefore, we are using Octal (a base-8 number system) and Hexadecimal (a base-16 number system) to represent a binary number in the digital system.

In mathematics, a 「base」 or a 「radix」 is the number of different digits or combination of digits and letters that a system of counting uses to represent numbers. ~Wiki~

Table1: Decimal, Binary, Octal and Hexadecimal
 Decimal Binary Octal Hexadecimal BCD 0 0 0 0 0000 1 1 1 1 0001 2 10 2 2 0010 3 11 3 3 0011 4 100 4 4 0100 5 101 5 5 0101 6 110 6 6 0110 7 111 7 7 0111 8 1000 10 8 1000 9 1001 11 9 1001 10 1010 12 A 0001 0000 11 1011 13 B 0001 0001 12 1100 14 C 0001 0010 13 1101 15 D 0001 0011 14 1110 16 E 0001 0100 15 1111 17 F 0001 0101 16 10000 20 10 0001 0110

## Conversions between Different Number Systems

Humans want to see and enter number in decimal, but computers must store and compute with bits. Therefore, we need to know how to convert a number into different number systems.

Basically, the number systems can be cataloged into two groups: decimal and binary systems. Figure 1: Number Systems

We can easily convert numbers between decimal and binary systems. If you need to convert a BCD number to another system, such as octal, the best solution is to convert the BCD number it to decimal first, then convert to binary, and finally to octal number.

## Common Powers

Most of common powers of base-10 and base-2 number system are shown as follows:

Base 10:
 Power Preface Symbol Value 10-12 pico p 0.000000000001 10-9 nano n 0.000000001 10-6 micro µ 0.000001 10-3 milli m 0.001 103 kilo K 1,000 106 mega M 1,000,000 109 giga G 1,000,000,000 1012 tera T 1,000,000,000,000
Base 2:
 Power Preface Symbol Value 210 kilo K 1,024 220 mega M 1,048,576 230 giga G 1,073,741,824 240 tera T 1,099,511,627,776 250 peta P 260 exa E 270 zetta Z 280 yotta Y