Home

Brainfuck

Brainfuck is an esoteric programming language created by Urban Müller in 1993. It is designed to be minimal and challenging, with a Turing-complete model that can be implemented with a small interpreter. The language emphasizes low-level manipulation of memory and pointers rather than readability or practicality.

Programs in Brainfuck consist of eight commands: >, <, +, -, ., ,, [, ]. All other characters are ignored as comments. The

The commands move the data pointer, modify the current cell, and perform I/O. '>' moves right; '<' left;

Because only eight symbols are significant, non-command characters can serve as comments. The language is Turing-complete,

Since its introduction, Brainfuck has inspired a family of esolangs and a large number of interpreters and

program
operates
on
an
array
of
memory
cells,
usually
bytes
initialized
to
zero,
with
a
data
pointer
starting
at
the
first
cell.
The
common
model
uses
30,000
cells,
though
many
implementations
allocate
more
as
needed.
'+'
increments
(wraps);
'-'
decrements;
'.'
outputs
the
cell
byte
as
ASCII;
','
reads
a
byte
into
the
cell
(often
blocking).
'['
begins
a
loop
that
runs
while
the
current
cell
is
nonzero;
']'
ends
the
loop
and
jumps
back
if
nonzero.
If
the
current
cell
is
zero
at
'[',
execution
jumps
to
after
the
matching
']'.
meaning
it
can
simulate
any
computable
function
given
sufficient
memory
and
time.
Practical
programs
tend
to
be
short,
but
writing
meaningful
code
is
difficult
due
to
the
terse
syntax.
compilers
across
languages.
It
is
widely
used
in
academic
and
recreational
settings
as
a
programming
puzzle
and
in
code
golf,
highlighting
the
relationship
between
minimal
syntax
and
computational
expressiveness.