Romasm - Roman Numeral Assembly Language

Binary-like operations using Roman numerals as register states

What is Romasm?

Register System

In binary, each position represents a power of 2. In Romasm, each Roman symbol (I, V, X, L, C, D, M) represents a fixed value that can be "on" or "off" in registers, like binary bits.

Example Register State:
I: ON V: OFF X: ON L: OFF

Value: 1 + 10 = 11

Pure Additive

No subtraction rules (IV, IX). In Romasm, 4 must be IIII. This allows direct 1:1 mapping to hardware states - you can't have a "subtractive" transistor.

Standard Roman: IV (subtractive)
Romasm: IIII (pure additive)

Binary Operations

Romasm supports binary logic operations (AND, OR, XOR) by comparing register states, just like binary operations compare bits.

Register Operations

Register A

Value: 0 | Roman: N

Register B

Value: 0 | Roman: N

Operations

Virtual Machine State

Romasm Examples

Romasm Operations

OR Operation

Combine active registers from both inputs

Register A: X I (value: 11)
Register B: V I (value: 6)
OR Result: X V I (value: 16)

AND Operation

Only keep registers active in both inputs

Register A: X I (value: 11)
Register B: V I (value: 6)
AND Result: I (value: 1)

Peasant Multiplication

Binary multiplication using duplation and mediation (ancient Roman method)

Multiply 7 × 13:
7 × 1 = 7 (odd, add)
14 × 0 = 0 (even, skip)
28 × 0 = 0 (even, skip)
Result: 7