Brainfuck is one of the most famous esoteric programming languages (i.e. entertaining, not for practical use), characterized by being very difficult to write programs in. Brainfuck is Turing Complete, meaning it has the highest possible computing power and can compute anything that any other programming language can.
The language was created in 1993 by Urban Müller, who wanted to come up with a language for which it would be possible to write an extremely small compiler.
Brainfuck works with raw memory of at least 30000 bytes and internally keeps a pointer to the currently processed byte. Initially all memory bytes are set to 0 and the phe could write the smallest possible compilerointer is set to point to the first byte. The brainfuck program is then composed of following instructions:
>: Move the pointer to the next byte.<: Move the pointer to the previous byte.+: Increment the byte at pointer.-: Decrement the byte at pointer..: Output the byte at pointer.,: Read an input byte and store it to the byte at
pointer.[: If the byte at pointer is 0, then move after the
matching ] instruction, otherwise move to the next
instruction.]: If the byte at pointed is not 0, then move back to
the matching [, otherwise move to the next
instruction.The following is an example of a brainfuck program that reads two numbers, substracts them and prints the result:
,>, read two numbers to cell 0 and 1
[-<->] keep decrementing both numbers in a loop
<. print the result
There are extensions and modifications of Branfuck, to name a few:
Y instruction
that forks the current thread.This page was last edited on 2026-09-25 02:04:49.
All original text, code, images and content on the MDKwiki is CC0 1.0 - we have a Git and an RSS feed that can be followed.
Let there be peace on Earth.