# A Brief Introduction to Non-Decimal Number Systems - Base 2 (Binary), Base 8 (Octal), and Base 16 (Hexedecimal)

Numbers play an important part in civilized human lives, and it is unlikely that civilization could have reached it's current level without these series of measurements. However, the average person knows only the base-10 decimal number system. While this is enough for most people, for those who wish to incorporate a deeper understanding of the mathematical systems related to computers, a basic understanding of the other number systems used in computers is needed, and thus this article begins.

### The Decimal System (Base 10)

Now, before we start, a review of the system we use might be helpful to understand other number systems. The decimal number system is a system where numerical values are determined by various combination of ten values (the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0). Each "place in a number can only have one value in it, therefore, the number 11, while being "eleven" in standard practice would be "1 in the tens spot, 1 in the ones spot" in strict terms. To be even more specific, 11 would be considered "1 in the 10^1 spot, 1 in the 10^0 spot, as "number spots" in all number systems are simple reverse elevating powers upon the total amount of values that can be entered into one spot, to explain with an example.

Take for instance the number 125,478, displayed in the table below:

What this table means is that this number is formed from the sum of the product of the bases to the values, in mathematical terms:

125478 = (1 * 10 ^ 5) + (2 * 10 ^ 4) + (5 * 10 ^ 3) + (4 * 10 ^ 2) + (7 * 10 ^ 1) + (8 * 10 ^ 0)

125478 = (1 * 100000) + (2 * 10000) + (5 * 1000) + (4 * 100) + (7 * 10) + (8 * 1)

125478 = 100000 + 20000 + 5000 + 400 + 70 + 8

125478 = 125478

If you understand this concept, the other number systems will be easy to learn. Let's move into one of these other systems now.

### The Binary System (Base 2)

The binary number system, like the decimal system, uses combination of values to represent numbers. However, there are only two potential number values in the binary system: 1 and 0. The same concept of reverse powers applies in this system however. For instance, let's take the binary number 1001:

So, in decimal, the binary number 1001 equals 2 ^ 3 + 2 ^ 0, (any place where there is a value of 0 does not need to be included into decimal conversion) which mathematically is:

1001 = (1 * 2 ^ 3) + (0 * 2 ^ 3) + (0 * 2 ^ 2) + (1 * 2 ^ 1)

1001 = (1 * 16) + (0 * 8) + (0 * 4) + (0 * 2) + (1 * 1)

1001 = 16 + 0 + 0 + 1

1001 = 17

So, the binary number 1001 equals the decimal number 17. Let's move to the octal system.

### The Octal System (Base 8)

Octal works the same way as decimal and binary, except with only 8 values (the numbers 0 to 7).

For example, let's take the octal number 11641:

As before, the reverse base concept means that the Octal number 11641 is equal to (1 * 4096) + (1 * 512) + (6 * 64) + (4 * 8) + (1 * 1), which equals 5025.

Finally, we reach the hexadecimal system.

### The Hexadecimal System (Base 16)

The Hexadecimal (shorthand: Hex) system shares the same concepts as the previous 3 systems except that it uses 16 values, the numbers 0 - 9 as well as the letters A - F (A signifying 10, to F, signifying 15).

Take the Hex number 1A7F:

This means that the number will equal 6783 if written in decimal.

And that's all there is to it, I hope this helped you understand the concept of number systems other then decimal.