# The Decimal Number System

> Understand how the decimal number system works: base 10 with digits 0 to 9, positional values based on powers of 10, and how it differs from Roman numerals.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2020-01-10 | Updated: 2020-11-07 | Topics: [Computer](https://flaviocopes.com/tags/computers/) | Canonical: https://flaviocopes.com/decimal-number-system/

In the Western world, the **decimal number system** is mostly what everyone knows about numbers.

Everyone knows it.

Post people _just_ know that.

There are many other number systems, but the society decided to use the decimal number system as the default.

I built a free [number base converter](https://flaviocopes.com/tools/number-base/) if you want to jump between decimal, binary, and hexadecimal without working it out by hand.

Why? I think the reason is that people have 2 hands (and 2 feet) with 5 fingers on them, and counting from 1 to 10 feels natural.

When you reach 10, you start from scratch to reach 20.

That's my guess, a pretty solid guess.

The decimal number system was invented by Indians and popularized by the Arabs, and it's still called [Hindu–Arabic number system](https://en.wikipedia.org/wiki/History_of_the_Hindu%E2%80%93Arabic_numeral_system).

The decimal number system is said to have **base 10** because it uses **10 digits**, from 0 to 9.

Digits are positional, which means the digit holds a different weight (value) depending on the position.

The `1` digit in the number `10` has a different value than in the number `31`, because in `10` it is put in position `2`, and in `31` it is put in position `1` (counting from right).

While this might sound obvious because you use this system since you were a child, not every number system works this way.

The roman number system, widely used in Europe since ancient Rome to the late middle ages, was still "base 10" but not positional. To represent `10` you used the letter `X`, to represent `100` you used `C`, to represent `1000` you used `M`.

In roman numerals, the number `243` in the decimal number system can be represented as `CCXLIII`.

You could not move letters around to change their meaning. Letters with a bigger value are always moved left compared to letters with less value. Except relatively to each letter, to form `4` using `IV`, for example (but this is another topic, let's get back to decimal numbers).

Any number in the decimal number system can be de-composed as the sum of other numbers, multiplied by the power of 10 depending on their position. Starting at position 0 from the right.

<p class="inline">
\[10^0\] equals to 1.
</p>

<br>

<p class="inline">
\[10^1\] equals to 10.
</p>

<br>

<p class="inline">
\[10^2\] equals to 100, and so on.
</p>

<br><br>
In the decimal number system:
<br><br>

<p class="inline">
<code>5</code> can be represented as \[5\times10^0\]
</p>

<br><br>

<p class="inline">
<code>42</code> can be represented as \[4\times10^1 + 2\times10^0\]
</p>

<br><br>

<p class="inline">
<code>254</code> can be represented as \[2\times10^2 + 5\times10^1 + 4\times10^0\]
</p>
