Brainfuck is an esoteric programming language created in 1993 by Urban Müller. It is designed to be extremely minimalistic, with only 8 commands that operate on a simple machine model.
The language consists of a 30,000-cell array of bytes, a data pointer that starts at cell 0, and two streams of bytes for input and output.
| Command | Description |
|---|---|
| > | Increment data pointer |
| < | Decrement data pointer |
| + | Increment byte at data pointer |
| - | Decrement byte at data pointer |
| . | Output byte at data pointer |
| , | Input byte to data pointer |
| [ | Jump forward if byte at data pointer is zero |
| ] | Jump backward if byte at data pointer is nonzero |
Execute the entire program at once and see the final output.
Execute the program one instruction at a time to see how memory changes.