OR
Jump to navigation
Jump to search
OR (One Register) is an esolang by User:ChuckEsoteric08 derived from 1-register Minsky machine
Specification
A language has a single register, initialised to one, and a constant, initialised to 0
Command | Description |
---|---|
> |
set constant to the amount of > 's. Example >>> sets the constant to 3
|
* |
Multiply register by a constant |
/x |
Tries to divide register by a constant, if it fails then it would jump to 1-indexed instruction x , which is encoded as a string of < 's, if it succesful then divide register by a constant and execute next instruction. Example: /<<< would jump to third instruction if it is not divisible by a constant
|
Computational class
The language is Turing-complete, as it can implement Minsky machine:
Each register is encoded as prime factors in a register, so the value 2a3b5c refers to three registers a, b and c
To increment a register you need to multiply a register by a prime number for that register:
> p-times, *
To decrement it we need to divide instead
> p-times, /x