The subtractive rule became “standard” only during the Middle Ages. But it's limited in application: only I, X and C can be used for subtraction (once) and next to a symbol of the “next size”:
- I can be used before V or X
- X can be used before L or C
- C can be used before D or M
(see http://en.wikipedia.org/wiki/Roman_numerals)
Thus $1999$ can be represented as MCMXCIX, not as MIM. The notation is in order from the highest units to the lowest:
M CM XC IX
that would be, without the abbrevations,
M D CCCC L XXXX V IIII
In Latin, the number would be spelled mille nongenti nonaginta novem and the number system reflected the names. So IM would mean nothing: Romans were not really good with arithmetic. ;) This can be found in modern usage, however.
I can't see any sensible way to parse CIIXMXCVCII. The tool you mention converts MIIM into $2000$ and IMIIM into $1999$, so I'm under the impression that it discards “illegal” subtractive symbols; if we remove II (as CIIX is converted to $110$) we get CXMXCVCII: $100+990+90+5+100+2=1287$ so I don't see where $1277$ comes from. Another example is VVCVCIV that's converted to $199$, while removing the first C gives VVVCIV that's converted to $109$.