From Esolang
Jump to navigation Jump to search

Ternary is an esoteric programming language created by zerosum0x0 in 2015. It consists only of the ASCII characters 0, 1, and 2. It is a member of the TrivialBrainfuckSubstitution family of programming languages.


Brainfuck Ternary Description
> 01 Move the pointer to the right
< 00 Move the pointer to the left
+ 11 Increment the memory cell under the pointer
- 10 Decrement the memory cell under the pointer
. 20 Output the character signified by the cell at the pointer
, 21 Input a character and store it in the cell at the pointer
[ 02 Jump past the matching 12 if the cell under the pointer is 0
] 12 Jump back to the matching 02


Hello, world! program


Cat program

The following demonstrates an infinitely repeating cat program which terminates if encountering the null character.


External resources