#### If input **number** is < highest **roman numeral**, then check with next highest **roman numerals**. Repeat the process above till the input **number** becomes 0. The StringBuilder will be the corresponding **roman numeral**. Let's understand the above steps through an example. Example. Suppose, we have **to convert** 36 into **roman numerals**. **To** have an in-depth understanding of converting **roman** **numerals** into decimals, we must first have an idea about the **roman** **numeral** system. It is a **number** system where letters are used to denote **numbers**. Modern **roman** **numerals** consist of 7 symbols, and each of them has a fixed decimal value. Write down ALL of the rules to **convert** **Roman** **to** Decimal. Remember though L is 50 and X is 10, whether or not the 10 is added to or subtracted from the 5 depends upon what side of the L it is found. So, LX is 60 and XL is 40. Likewise for other **numbers**. V is 5, I is 1, VIII is 8, IV is 4, 3 is III, 2 is II, etc.

**To**write 2 into

**roman**

**numeral**, we take two 1 (I), which makes II. Similarly, to write 12 into

**roman**

**numeral**, we take 10 (X) and 2 (II) i.e. XII. If we observe closely then we get that

**roman**

**numeral**adds the required seven fundamental

**numerals**in descending order to make up the numeber. For example, 1012 = 1000 (M) + 10 (X) + 2 (II) = MXII. Similar to this, to

**convert**a binary

**number**

**to**an octal

**number**, we could simply break a binary

**number**into groups of 3 digits and the rest of the procedure is the same as converting binary

**number**

**to**a hexadecimal

**number**. Let's covert the same binary

**number**

**to**an octal

**number**: $100100010101111_ {2}=100 100 010 101 111$. .