All memory is stored in a "tape" that is infinitely long, each segment holding an integer number. The symbols the programming language uses are: > : moves right on the tape < : moves left on the tape + : changes the value the tape is on by 1 - : changes the value the tape is on by -1 , :requests an integer input from user . :outputs value the tape is on [ : does nothing unless value on tape is 0, then it jumps forward to the corresponding ] ] : does nothing unless value on tape is not 0, then it jumps back to the corresponding [ Comments are any text that is not these symbols T to show/hide tape
Credit to https://scratch.mit.edu/discuss/topic/246459/ for idea It's supposed to be hard to program. Some programs to get you started: Move a number on the tape to another position: ,>[-]<[>+<-]>. Addition: ,>,<[>+<-]>. Multiplication: ,>,<[>[>+>+<<-]>>[-<<+>>]<<<-]>[-]>. Subtraction: ,>,[<->-]<. Copy a value to another location: ,[>+>+<<-]>>[<<+>>-]<<. Clear the position on the tape: [-] Perfect Square Generator: +[[>+>+<<-]>.>++[<+<+>>-]<.<++]