Number System

Learn how to represent numbers in different base systems.

Numbers and their representations

Imagine a herder in ancient times. They have twelve stones with which to count their 1212 sheep:

However, they can only count up to three, so they arrange the stones into groups of three:

The above picture is a representation of the number of stones. We have one large group of three groups of three stones plus a separate group of three stones. This example helps illustrate that there are many ways to represent numbers, some of which are given below:

  • Decimal representation
  • Ternary representation
  • Binary representation
  • Hexadecimal representation

Decimal representation (base ten)

Now, let’s imagine our shepherd can count to ten, not 33. They would then organize the same number of stones in an entirely different way—they would have one group of ten stones and another group of two stones. Below, we can see how twelve stones are represented in arithmetic notation if we can count up to ten, with some examples.

Examples:

  • We have one group of ten numbers plus two:

12dec=110+2      12_{\text{dec}} =1*10+2 \space\space\space\space\space\space or      1101+2100\space\space\space\space\space\space1*10^1 +2*10^0

12dec12_{\text{dec}} is 1212 units or we can say 11 ten plus 22 units.

  • Here is another exercise with one hundred and twenty-three stones. We have 11 group of ten by ten stones, another group of 22 groups of ten stones, and the last group of 33 stones:

123dec=11010+210+3   123_{\text{dec}} = 1 * 10*10 + 2 * 10 + 3\space\space\space or    1102+2101+3100\space\space\space\ 1 * 10^2 + 2 * 10^1 + 3 * 10^0

123dec123_{\text{dec}} is 123123 units, or 1212 tens plus ...