We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

↑110010000100110110010

From Esolang
(Redirected from /\110010000100110110010)
Jump to navigation Jump to search
Not to be confused with ↓110010000100110110010.

↑110010000100110110010 is an esolang by User:PythonshellDebugwindow.

Memory

↑110010000100110110010 uses data (initialized to an right-unbounded infinite tape of zeros), a data pointer (initialized to 0), a command pointer (initialized to nil), and a jump offset (initialized to 0), all of which are unbounded signed integers (or, in the data's case, a right-unbounded tape of them).

Commands

The command is on the left, and the value of the command pointer is on the top.

Programming in this language takes a lot of trial and error, and sometimes simple effects can take 3 commands. Due to the command pointer, and the sometimes not-so-obvious ways to change it as desired, you have to go through the whole program character-by-character to find out what any one character does.

Undefined behaviour

It's undefined behaviour when the data pointer goes negative, or when a jump goes out-of-bounds.

Snippets

To set the command pointer to 1 if it's at nil:

↨↑↓

Examples

One-time cat program

↨↓↑↓↕

XKCD Random Number

↑↑↑↑↕↕

Computational class

↑110010000100110110010 can be proven Turing-complete via reduction from brainfuck.

Programs start and end with ↨ to initialize the program and avoid undefined behavior respectively. Spaces are added for clarity, and should be removed in an actual translation.

brainfuck ↑110010000100110110010
> ↨↑↨
< ↨↓↨
+ ↑0↑↕↑
- ↑0↓↕↑
. ↑1↕↨↨
, ↓
[ ↑11↨↨↑ jump offset A 0↨↕↑↕1↨↕↓↕↑
] ↑11↨↨↑ jump offset B ↑0

To calculate the jump offsets, it is necessary to first translate all the brainfuck instructions in the loop. The resulting number of ↑110010000100110110010 commands will be defined as C. To calculate jump offset A, find an integer A such that A = C + 14 + 6⌊log2(A)⌋. To calculate jump offset B, find an integer B such that B = C + 24 + 6⌊log2(A)⌋ + 6⌊log2(B)⌋. To substitute the jump offsets into the translation, convert the numbers into binary (without leading zeros), remove the leading digit (with leading zeros, ex: 101 → 01), and replace every 0 with ↕↑↕↕↕↑ and every 1 with ↕1↑↨↨↑.

For example, the brainfuck program [-] translates into ↑11↨↨↑ ↕1↑↨↨↑ ↕↑↕↕↕↑ ↕↑↕↕↕↑ ↕↑↕↕↕↑ ↕1↑↨↨↑ 0↨↕↑↕1↨↕↓↕↑  ↑0↓↕↑  ↑11↨↨↑ ↕↑↕↕↕↑ ↕1↑↨↨↑ ↕1↑↨↨↑ ↕1↑↨↨↑ ↕1↑↨↨↑ ↕1↑↨↨↑ ↑0 (spaces, again, added for clarity). The jump offsets for the loop in this example are: A = 49 and B = 95.

External resources