Binary to Roman Number Converter
Convert binary numbers to Roman numerals instantly. Supports values from 1 to 3,999,999 with vinculum notation and step-by-step breakdown.
About
Converting between binary and Roman numeral systems requires a two-stage transformation: base-2 to base-10, then base-10 to additive-subtractive Roman notation. Errors in either stage cascade silently. A misread binary digit doubles or halves the decimal intermediate, producing a completely wrong Roman output. This tool computes d = parseInt(b, 2) then decomposes d using the greedy algorithm against the standard 13-symbol Roman table extended with vinculum notation for values above 3,999. The conversion handles subtractive pairs (IV, IX, XL, XC, CD, CM) per modern convention, not the archaic additive form.
Standard Roman numerals cap at 3,999 (MMMCMXCIX). This tool extends to 3,999,999 using vinculum: an overline multiplies a symbol by 1,000. For example, 5,000 is represented as V with an overline. Note: zero has no Roman representation. Binary input 0 returns an explicit error rather than a misleading empty string. Pro tip: verify your binary source uses unsigned integers. Signed binary (two's complement) produces negative decimals, which Roman numerals cannot express.
Formulas
The conversion proceeds in two deterministic stages. Stage 1 converts the binary string b of length n into its decimal equivalent d:
where bi is the i-th bit from the right (LSB at position 0).
Stage 2 applies the greedy decomposition algorithm. Given the Roman value-symbol table R sorted in descending order of value:
For each pair (v, s) in R: while d âĨ v, append s to output and subtract d â d â v. The algorithm terminates when d = 0. The vinculum extension multiplies each base symbol by 1,000 and renders it with an overline (e.g., VĖ = 5,000).
Reference Data
| Binary | Decimal | Roman | Notes |
|---|---|---|---|
| 1 | 1 | I | Unit |
| 10 | 2 | II | Additive |
| 11 | 3 | III | Max repeat of I |
| 100 | 4 | IV | Subtractive pair |
| 101 | 5 | V | Quinary symbol |
| 1001 | 9 | IX | Subtractive pair |
| 1010 | 10 | X | Decimal symbol |
| 101000 | 40 | XL | Subtractive pair |
| 110010 | 50 | L | Half-centum |
| 1011010 | 90 | XC | Subtractive pair |
| 1100100 | 100 | C | Centum |
| 110000100 | 388 | CCCLXXXVIII | Longest standard < 1000 |
| 110010000 | 400 | CD | Subtractive pair |
| 111110100 | 500 | D | Half-mille |
| 1110000100 | 900 | CM | Subtractive pair |
| 1111101000 | 1000 | M | Mille |
| 11000011010 | 1562 | MDLXII | Year example |
| 11111010000 | 2000 | MM | Two thousand |
| 11111011001 | 2009 | MMIX | Year example |
| 11111100100 | 2020 | MMXX | Year example |
| 11111100101 | 2025 | MMXXV | Current year |
| 110000110101 | 3125 | MMMCXXV | 55 |
| 111110011111 | 3999 | MMMCMXCIX | Max standard Roman |
| 1001110001000 | 5000 | VĖ | Vinculum (Ã1000) |
| 10011100010000 | 10000 | XĖ | Vinculum |
| 11110100001001000000 | 1000000 | MĖ | One million vinculum |