Binary Brainfuck

From Esolang
Jump to navigation Jump to search

Binary Brainfuck(BBF) is an esoteric programming language intented to show the complexity of programming.

Commands

Brainfuck Binaryfuck
+ 010
- 011
> 100
< 101
. 000
, 001
[ 110
] 111

Implemantation

A compiler from BBF to BF in Python:

def bbf2bf(haep):
   haep = haep.replace(" ","")
   haep = haep.replace("\n","")
   chars = list(haep)
   result = str()
   for i in range(len(chars)):
       if i%3 == 0:
           c = chars[i]+chars[i+1]+chars[i+2]
           if c == "000":
               result += "."
           elif c == "001":
               result += ","
           elif c == "010":
               result += "+"
           elif c == "011":
               result += "-"
           elif c == "100":
               result += ">"
           elif c == "101":
               result += "<"
           elif c == "110":
               result += "["
           elif c == "111":
               result += "]"
   return (result)

Hello World! Script

010
010
010
010
010
010
010
010
010
010
110
100
010
010
010
010
010
010
010
100
010
010
010
010
010
010
010
010
010
010
100
010
010
010
100
010
101
101
101
101
011
111
100
010
010
000
100
010
000
010
010
010
010
010
010
010
000
000
010
010
010
000
100
010
010
000
101
101
010
010
010
010
010
010
010
010
010
010
010
010
010
010
010
000
100
000
010
010
010
000
011
011
011
011
011
011
000
011
011
011
011
011
011
011
011
000
100
010
000
100
000
010
010
010
000