
|
Roman numerals are based on the following equivalents:
Roman Arabic M 1000 D 500 C 100 L 50 X 10 V 5 I 1 The Roman numerals are arranged from left to right in order of decreasing value and added. For example, MMII = 2*1000 + 2*1 = 2002. If a lower numeral appears before a higher one, it is subtracted from the higher value, not added to the total. For example, IX = -1 + 10 = 9. Similarly, XC = -10 + 100 = 90, and XL = -10 + 50 = 40. This avoids writting Roman numerals with more than three consecutive occurrences of the same letter; for example, IV <-- IIII, XL <-- XXXX. An example:
MCMXLIX = M C M X L I X
= 1000 + ( -100 + 1000 ) + ( -10 + 50 ) + ( -1 + 10 )
= 1000 + 900 + 40 + 9
= 1949
However, MMMM = 4000 since there is no character for a value larger than 1000.
|