tinyBF
Jump to navigation
Jump to search
- Not to be confused with TinyF.
tinyBF is a brainfuck equivalent with only 4 characters. It's a variant of RISBF and was created by Michael Gianfreda, Nov. 6, 2014. tinyBF programs are smaller than RISBF's. The motivation for creating tinyBF was to have four 2-bit commands in one byte of program memory.
Command | Description |
---|---|
=
|
Switch direction (- ↔ + ) (default: + )
|
+
|
Change data in selected direction. BF equivalents: - +
|
>
|
Change cell in selected direction. BF equivalents: < >
|
|
|
Jump in selected direction. BF equivalents: ] [
|
Output
Since switching the direction twice doesn't change anything, we can use this as the output function: ==
.
Input
The brainfuck endless loop []
can be used as input function: |=|
if switch is positive, =|=|
if switch is negative.
Examples
Hello World
++++++++|>++++|>++>+++>+++>+=>>>>+|=>+>+>=+=>>+|=>|>+|=>>==>=+++== =+++++++====+++==>>===>+==>===+++===++++++==++++++++===>>+==>++==
Reverse input
+|>|=|=|>+=|+===>+|
External resources
- A tiny (1476 Bytes) brainfuck-to-tinyBF translator and interpreter in Javascript (from the Wayback Machine; retrieved on 22 March 2016)
- Common Lisp implementation of the tinyBF programming language.