2DChanger

From Esolang
Jump to navigation Jump to search

2DChanger is BitChanger, except it is two-dimensional.

Commands

Command Meaning
} flip bit and move bit pointer to the right
< move bit pointer to the left
+ if current bit is not zero, move instruction pointer (IP) clockwise, else counter-clockwise

Examples

Hello, World!

The following program replicates the bits corresponding to the ASCII codes contained in the text “Hello, World!” in the memory. Each character is represented by eight bits, from most significant to the least significant position. Please note that a single zero-bit is appended to the memory as a consequence of the necessity to move the cell pointer during the bit setting process. Each row of the program serves to encode one character from the message.

 }<}}}<}}<}}}<}}<}}<}    }<+
+}}<}}}<}}<}}}}<}        <}+
+}<}}}}<}}}}<}}<}        }<+
+}<}}<}}}}<}}}}<}        <}+
+}<}}}}<}}}}}            }<+
+}<}}<}}}}<}}}<}}<}      <}+
+}<}}<}}}<}}<}}<}}<}}<}  }<+
+}}}}<}}}<}}}<}          <}+
+}<}}}}<}}}}}            }<+
+}<}}}<}}<}}}}}<}        <}+
+}<}}}}<}}}}<}}<}        }<+
+}<}}<}}}<}}<}}}}<}      <}+
+}<}}<}}}<}}<}}<}}<}}       

Interpreter

  • Common Lisp implementation of the 2DChanger programming language. The program also includes a text program generator which produces the 2DChanger source code capable of replicating a string's ASCII codes in the memory in binary form.