tinyBF

From Esolang
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