DEV Community

Wox Tox Fox
Wox Tox Fox

Posted on

How roman numerals work

When we say "I have 12 chocolates", the number system we are using is base 10.
It is composed of 10 digits from 0 through 9. It's positional, which means each
digit's value depends on the position it resides in. When we say 12, we mean
1 ten and 2 ones with a grand total of 12.

Roman Numerals

Apart from the normal numbers, we see another weird number system used on
ancient clocks, music theory, etc. This are roman numerals.

Have you ever wondered why IV is 4 and VI is 6 in roman numerals? Let's deep
dive into how roman numerals work!

Roman numerals consist of 7 digits.

  • I one
  • V five
  • X ten
  • L fifty
  • C hundred
  • D five hundred
  • M thousand

How roman numerals work

Roman numbers are non-positional, which means, the V in VII and XV have the same
value of 5. Even though these are influenced by the digit that comes after
them, they not influenced by their position.

We could add two digits by stacking the smaller one after the bigger one. For
example, VI represents 5 + 1 which is 6.

We could also subtract digits by stacking the bigger one after the smaller
one. For example, IV represents 5 - 1 which is 4. This is actual essence of
roman numerals. In other words, when a number is followed by a bigger number,
the smaller number thats before it, is considered to be negative.

There's a catch. In this subtracting mechanism, A digit can only be placed
before its next or the next's next in the digit hierarchy. That
means, I can only be placed before V and X. It cant be placed before any other
digits, say, L.

To represent 49, We say XLIX (- 10 + 50 - 1 + 10) and not IL (50 - 1).

Top comments (0)