personal
BFI
A Brainfuck interpreter written in C++ — a Turing-complete esoteric language interpreter exploring the minimal boundary of computation
C++ C++17 Systems Programming
Project Overview
A Brainfuck interpreter written in C++ — a Turing-complete esoteric language interpreter exploring the minimal boundary of computation
README.md
README.md
Project Overview
BFI is a Brainfuck interpreter written in C++17. Brainfuck is an esoteric programming language with only 8 instructions, yet it’s Turing-complete. This project interprets Brainfuck programs, handling memory cells, pointer manipulation, I/O, and loop control flow.
Usage
g++ -std=c++17 -O2 -Wall -o bfi main.cpp
./bfi programs/hello.bf # Hello World!
Key Features
Instruction Set
All 8 Brainfuck instructions implemented:
><— Move memory pointer+-— Increment/decrement cell.,— Output/input character[]— Loop begin/end
Demo Programs
hello.bf— Hello Worldcat.bf— Echo inputcount.bf— Count from 0
Learning Outcomes
- Interpreter design and instruction dispatch
- Memory model implementation (tape with pointer)
- Bracket matching for loop control flow
- How minimal a Turing-complete language can be