LinearModulo2

From Esolang
Jump to navigation Jump to search

Inspired by Modulo 2.

This can emulate any 1D cellular automaton.

Symbols

This language uses Prefix(Polish) notation and the following symbols:

Symbol Name Args Evaluates to
. Reg None The register's value
< Left x x*2
> Right x x//2
| Nand x,y x Bitwise NAND y

Each program is a single expression, receive a bitstream, and evaluates to a bitstream.

The output is then fed back to the same program as the input, making an infinite loop.

Computational class

Surprisingly, this thing is Turing Complete, just because this Rule 110 Emulator:

||.|<.<.|||.|.>.|>.|.>.||.|.>.|>.|.>.

Try it online!

Example programs

Sierpinski triangle:

||.|.>.|>.|.>.