Skip to content

Instantly share code, notes, and snippets.

View cliffcheney's full-sized avatar

Cliff Cheney cliffcheney

View GitHub Profile
@cliffcheney
cliffcheney / fibonacci.bf
Last active December 11, 2024 02:40 — forked from pablomm/fibonacci.bf
Fibonacci Sequence in brainfuck
// Brainfuck Fibonacci calculation
// Forked from pablomm/fibonacci_bf
// Forked to add numeric value output Comments added to allow reverse engineering
+> // Set #1 to 1; Shift to #2
+> // Set #2 to 1l Shift to #3 (CLP)
<< // Shift to #1 for output loop of #1 and #2
[
++++++++++ ++++++++++ ++++++++++ ++++++++++ ++++++++ . ---------- ---------- ---------- ---------- --------> // Add 48; Output ASCII; Decrease 48: shift right 1
>>>>>>>>>> ++++++++++ ++++++++++ ++++++++++ ++ . ---------- ---------- ---------- -- <<<<<<<<<< // Shift to #10; Outpur ASCII 32 as SPACE