Brainfuck examples

Here some of my experiments. The output itself is usually not very fascinating. Have a look at the sourcecode instead (which is sometimes also commented):

  • Hello World Explanation necessary? :)
  • Echo Echoes back user input
  • Reverse Echoes back user input in reverse order
  • Add/Move Adds register 0 to register 1. This example makes use of the debug character '#' to illustrate this.
  • Countdown This will simulate a countdown from 9 to 0 (actually, it is only moving down 10 characters in the ASCII-chart. Source-code commented, have a look at it).
  • Some examples I found on the internet:

  • 99 bottles of beer by Eric Bock outputs a rather lenghty and funny text. This takes a while to compute, so be patient.
  • Prime numbers (author unknown) computes prime numbers up to the number you enter. I chose '10' as the upper boundary, but you can change it in the source. This also takes a while to compute, be patient.