+ adds one to the value under the pointer - subtracts one from the value under the pointer > moves the pointer one forward < moves the pointer one backward [ and ] work as a while loop; while the value under the pointer is more than zero, the script in the brackets will run. . prints the value under the pointer , asks for an input \ treats new outputs as alpha; 1-26: a-z, 27-52: A-Z, 53-57: .,!?[space], 58-67: 0-9 / (default) treats new outputs as numbers
Examples: count up: ,[>+.<-] count down: ,[.-] adder: ,>,[<+>-]<. subtractor: ,>,[<->-]<. multiplier: ,>,<[>[>+<-]>[>+<<+>-]<<-]>>>. divisibility test: ,>,<[>[>>+<<-]>>[<+<+>>-]<[<<->>-]<<]+[>>>+<<<-]>>>. divider (ceiling): ,>,<[>[>>+<<-]>>[<+<+>>-]<[<<->>-]>>+<<<<]>>>>. Fibonacci: +.>+.>>,[<<[>+<-]<[>+<-]>>[<+<+>>-]<.>>-] Hello, World!: \>+++++++++++[<++++>-]<[>+>+>+>+<<<<-]>----------.<+++++.+++++++..+++.>>++++++++++. +++.>+++++.<<<.+++.------.--------.>>>>+++++++++++.