2 Changed how the bytecount is reported--hopefully will play better with the catalog snippet now
source | link

Bitwise Cyclic Tag, 3 bits = 0.375 bytesor < 1 byte

Bitwise Cyclic Tag is one of the simplest Turing-complete languages out there. It works with two bitstrings, the program and the data. The bits of the program are read cyclically and interpreted as follows:

  • 0: Delete the first data bit (and output it, in implementations that have output).
  • 1x: If the first data bit is 1, append x (representing either 0 or 1) to the end of the data. (If the first data bit is 0, do nothing.)

The program runs until the data string is empty.

Truth-machine

110

When the data string is set to 0:

  • 11 does not append anything because the first data bit is not 1.
  • 0 deletes/outputs 0.
  • The data string is now empty and the program halts.

When the data string is set to 1:

  • 11 appends a 1.
  • 0 deletes/outputs 1.
  • The data string is back to a single 1 and the program is back to where it started, so we loop forever.

Bitwise Cyclic Tag, 3 bits = 0.375 bytes

Bitwise Cyclic Tag is one of the simplest Turing-complete languages out there. It works with two bitstrings, the program and the data. The bits of the program are read cyclically and interpreted as follows:

  • 0: Delete the first data bit (and output it, in implementations that have output).
  • 1x: If the first data bit is 1, append x (representing either 0 or 1) to the end of the data. (If the first data bit is 0, do nothing.)

The program runs until the data string is empty.

Truth-machine

110

When the data string is set to 0:

  • 11 does not append anything because the first data bit is not 1.
  • 0 deletes/outputs 0.
  • The data string is now empty and the program halts.

When the data string is set to 1:

  • 11 appends a 1.
  • 0 deletes/outputs 1.
  • The data string is back to a single 1 and the program is back to where it started, so we loop forever.

Bitwise Cyclic Tag, 3 bits or < 1 byte

Bitwise Cyclic Tag is one of the simplest Turing-complete languages out there. It works with two bitstrings, the program and the data. The bits of the program are read cyclically and interpreted as follows:

  • 0: Delete the first data bit (and output it, in implementations that have output).
  • 1x: If the first data bit is 1, append x (representing either 0 or 1) to the end of the data. (If the first data bit is 0, do nothing.)

The program runs until the data string is empty.

Truth-machine

110

When the data string is set to 0:

  • 11 does not append anything because the first data bit is not 1.
  • 0 deletes/outputs 0.
  • The data string is now empty and the program halts.

When the data string is set to 1:

  • 11 appends a 1.
  • 0 deletes/outputs 1.
  • The data string is back to a single 1 and the program is back to where it started, so we loop forever.
1
source | link

Bitwise Cyclic Tag, 3 bits = 0.375 bytes

Bitwise Cyclic Tag is one of the simplest Turing-complete languages out there. It works with two bitstrings, the program and the data. The bits of the program are read cyclically and interpreted as follows:

  • 0: Delete the first data bit (and output it, in implementations that have output).
  • 1x: If the first data bit is 1, append x (representing either 0 or 1) to the end of the data. (If the first data bit is 0, do nothing.)

The program runs until the data string is empty.

Truth-machine

110

When the data string is set to 0:

  • 11 does not append anything because the first data bit is not 1.
  • 0 deletes/outputs 0.
  • The data string is now empty and the program halts.

When the data string is set to 1:

  • 11 appends a 1.
  • 0 deletes/outputs 1.
  • The data string is back to a single 1 and the program is back to where it started, so we loop forever.