BitBrain

From Esolang
Jump to navigation Jump to search

BitBrain is a language by User:ChuckEsoteric08 based on BF, but with bits. There is only 10 bits by default, but you can add more bits.

Commands

Command Meaning
> move pointer to the right
< move pointer to the left
* flip current bit
[ jump to matching ] if bit is zero
] jump to matching [ if bit is not zero
+ add new bit

Variations

BitBrain-E

Original version of the language. + adds bit to the end of a tape

BitBrain-R

+ adds bit after the current cell. Used for Computational class proofs for various esolangs such as NASAL and StackBit. It could simulate BitBrain-E like that:

BitBrain-E BitBrain-R
Program Start ++++++++++>*>>*>>*>>*>>*>>*>>*>>*>>*<<<<<<<<<<<<<<<<
> >>
< <<
+ >[>>]*++[<<]<

[]* are the same

BitBrain-L

Opposite of BitBrain-R. Adds bit before the current cell. Can simulate BitBrain-E like that:

BitBrain-E BitBrain-L
Program Start +<+<+<+<+<+<+<+<+<+*>>*>>*>>*>>*>>*>>*>>*>>*<<<<<<<<<<<<<<<<
> >>
< <<
+ >[>>]+<+<*[<<]<

[]* are the same It can also simulate BitBrain-R like that:

BitBrain-R BitBrain-L
Program Start >>>>>>>>>
> <
< >

[]*+ are the same. Also can be applied to BitBrain-L to compile it to BitBrain-R

BitBrain-S

Opposite of BitBrain-E. Adds the cell to the start of a tape. Can simulate BitBrain-E like that:

BitBrain-E BitBrain-S
Program Start >>>>>>>>>
> <
< >

[]*+ are the same. Also can be applied to BitBrain-S to compile it to BitBrain-E

External resources

Interpreter in Scratch

Computational class

It is Turing-complete, because it is version of Smallfuck with ability to epand tape.