Boolfuck

From Esolang
Jump to: navigation, search

Boolfuck is an esoteric programming language based on Brainfuck, but operating only on bits. It does, however, provide input and output.

Computational class[edit]

Boolfuck can be shown to be Turing-complete by reduction from Brainfuck. Each Brainfuck program maps to a Boolfuck program - so anything that can be expressed in Brainfuck can also be expressed in Boolfuck - and Brainfuck is known to be Turing-complete. More details on the reduction can be found at the Boolfuck website, listed below.

Differences from Brainfuck[edit]

  • Works with bits not bytes (each cell is a single bit)
  • The output character is ; not .
  • The input is read in little endian mode and reads a single bit at a time.
  • Output is stored to a stream, then outputted in little endian mode

Examples[edit]

Here is a sample Boolfuck program; it outputs Hello, world!:

;;;+;+;;+;+;
+;+;+;+;;+;;+;
;;+;;+;+;;+;
;;+;;+;+;;+;
+;;;;+;+;;+;
;;+;;+;+;+;;
;;;;;+;+;;
+;;;+;+;;;+;
+;;;;+;+;;+;
;+;+;;+;;;+;
;;+;;+;+;;+;
;;+;+;;+;;+;
+;+;;;;+;+;;
;+;+;+;

See also[edit]

External resources[edit]