Roman numerals are base 10, luckily, so it's not too hard to convert between systems.
The roman symbols stop at 1000, so after that, I'll use the symbol, folloed an apostrophe. This multiplies the value of the symbol by 1000. In reality, this is represented by a line on top of the symbol.
For each power of ten, there are two symbol that need to be used, which I will call the base, and the quintuple, which is always five times the base:
1s: b: I, q: V
10s: X, L
100s: C, D
1000s: M, V'
10000s: X', L'
And so on.
To represent a decimal digit, we merely need to use a combination of bases and quintuples:
If the digit is 0, then nothing is used
1: base
2: base, base
3: bbb
4: bq
5: q
6: qb
7: qbb
8: qbbb
9: base, and the base of the next order of magnitude
I'll use 8192 as my example:
First, break up the number into decimal digits: {8,1,9,2}
8: qbbb -> The quintuple of 1000s is V', and it's base is M, so V'MMM
1: b -> The base of 100s is C, so C
9: bb+ -> XC
2: bb -> II
We string together everything in the same order: V'MMMCXCII