BinaryLanguage
		
		
		
		Jump to navigation
		Jump to search
		
| Paradigm(s) | unknown | 
|---|---|
| Designed by | User:None1 | 
| Appeared in | 2023 | 
| Memory system | Accumulator-based | 
| Dimensions | one-dimensional | 
| Computational class | Turing complete | 
| Reference implementation | Official interpreter in Python | 
| Influenced by | brainfuck Befunge | 
| File extension(s) | .bl | 
BinaryLanguage is an esolang created by User:None1 which uses some simple binary operations.
Memory Model
BinaryLanguage uses three registers (initially zero): A, B and C. They can contain unsigned integers of any size (or up to at least 210000).
Commands
| Command | Meaning | Example | 
|---|---|---|
| + | Increments A | A=1,B=2,C=3 → A=2,B=2,C=3 | 
| - | Decrements A(Note: IfA=0, thenAis unchanged) | A=1,B=2,C=3 → A=0,B=2,C=3 | 
| & | Bitwise and AandB, stores the result inA | A=1,B=2,C=3 → A=0,B=2,C=3 | 
| ^ | Bitwise xor AandB, stores the result inA | A=1,B=2,C=3 → A=3,B=2,C=3 | 
| | | Bitwise or AandB, stores the result inA | A=1,B=2,C=3 → A=3,B=2,C=3 | 
| < | Bitwise left shift AbyBbits, stores the result inA | A=1,B=2,C=3 → A=4,B=2,C=3 | 
| > | Bitwise right shift AbyBbits, stores the result inA | A=17,B=2,C=3 → A=4,B=2,C=3 | 
| ~ | Swaps AandB | A=1,B=2,C=3 → A=2,B=1,C=3 | 
| * | Performs a right circular shift to the three registers | A=1,B=2,C=3 → A=3,B=1,C=2 | 
| ( | If A=0, jump to the matching) | - | 
| ) | If A!=0, jump to the matching( | - | 
| , | Reads a character from user input and stores its ASCII value to A | - | 
| . | Output the character with its ASCII value the same as A | - | 
Incorrect commands echo themselves.
Example Programs
Hello World (also a Quine)
Hello World!
Cat Program (never terminates)
+(~,.~)
Truth Machine
+++~++++~<~,^(^(.))^.
Turing Completeness
BinaryLanguage is Turing complete as a conversion from brainfuck is possible.
| brainfuck | BinaryLanguage | 
|---|---|
| + | (-)+<(*+**-) | 
| - | (-)+<(*-**-) | 
| > | ~++++++++~ | 
| < | ~--------~ | 
| , | (-)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<*~&~^**,<| | 
| . | (-)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<*~&~**>. | 
| [ | (-)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<*~&~**>( | 
| ] | (-)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<*~&~**>) | 
