Search for a tool
Brainfuck

Tool to decode/encode in Brainfuck, an esoteric programming language consisting of characters like ++++---[+++].

Results

Brainfuck -

Tag(s) : Programming Language

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Brainfuck' tool for free! Thank you!

Brainfuck

Brainfuck Interpreter




Loading...
(if this message do not disappear, try to refresh this page)

Brainfuck Encoder

 


Answers to Questions (FAQ)

What is Brainfuck? (Definition)

Brainfuck (or BF or Brainf**k) is a minimalist programmation language that uses only eight commands to manipulate memory and perform operations.

It takes its name from two words brain and fuck, that refer to a kind of major frustration for your brain (or cerebral masturbation).

How does Brainfuck work?

The Brainfuck works like a Turing Machine, with a read/write head (pointer) that manipulates a buffer. The 8 possible machine operations are:

> : increment the pointer position (+1),

< : decrement the pointer position (-1),

+ : increment the byte in the memory cell where the pointer is located,

- : decrement the byte in the memory cell where the pointer is located,

. : send the value of the pointed byte as output (treated as an ASCII value),

, : insert an input byte (user input) in the memory cell where the pointer is located (ASCII value),

[ : if the pointed byte is 0 then jump to instruction after the corresponding ],

] : if the pointed byte is not 0 then jump to the instruction after the corresponding [

How to encrypt using Brainfuck code?

Brain Fuck is not a proper encryption system, but rather an obfuscated/unreadable programming language.

Brainfuck encoding consists in writing machine code (input) that returns text as output.

In practice, increment the pointer memory box to the desired ASCII value and display the corresponding character as output.

Example: The code consisting of 36 + followed by 1 point '++++++++++++++++++++++++++++++++++++ +.' displays $ (Dollar symbol, ASCII code 36)

How to encrypt using Brainfuck Shortcut code?

In order to shorten the code, an alternative syntax exists (shortcut BF) that uses i for increment, d for decrement, r for right, l for left each associated to a number to indicate the repetition of the operation. It allows to gain in compactness and slightly in readability of the code.

Example: i4 for ++++ (+ 4 times), d3 for --- (- 3 times), r5 for >>>>>, l4 for <<<<

How to decrypt Brainfuck code?

Once again it is not an decryption but rather an interpretation of the code (or brainfuck translator that turn brainfuck to text).

With an interpreter and a brainfuck compiler, each byte send as output is then a plain text character.

How to decrypt Brainfuck Shortcut code?

Replace iX, dX, rX and lX by respectively +, -, >, < X times to get back the original BF code.

How to recognize Brainfuck coded text?

The message is composed of the 8 characters ><+-.,[] (opening chevron, closing chevron, plus, minus, point, comma, open bracket, closing bracket)

The character [ should appear as many times as the character ]

The characters + and - are the most common and usually appear to +++ group or ---. It makes little sense (but possible) to have + and - consecutively.

The characters . and , are less frequent.

All references to brain, skull, mind or headache are clues.

What is the memory state?

The brainfuck manipulates a buffer strip, the memory state is the contents of this memory.

dCode offers the display of the memory buffer in table form: [position] = character (ASCII code)

What are the variants of the Brainfuck code?

Many variants of brainfuck have become esoteric languages (esolang) such as Alphuck, Binaryfuck, Ook, Blub, Pikalang, Reversefuck or Spoon.

What is Brainfuck for?

Brainfuck is never used as a language in real development projects due to its complexity and lack of features.

However it is sometimes used for educational purposes, to teach programming concepts such as memory manipulation, loops and conditional jumps.

It can also be used as a challenge for programmers wanting to test their skills and understanding of fundamental programming concepts.

When was Brainfuck invented?

BF language was created by Urban Müller in 1993.

Source code

dCode retains ownership of the "Brainfuck" source code. Except explicit open source licence (indicated Creative Commons / free), the "Brainfuck" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Brainfuck" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Brainfuck" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Brainfuck" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Brainfuck on dCode.fr [online website], retrieved on 2024-11-19, https://www.dcode.fr/brainfuck-language

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Brainfuck' tool for free! Thank you!


https://www.dcode.fr/brainfuck-language
© 2024 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
 
Feedback