Brain Ah Fuck
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
- This is still a work in progress. It may be changed in the future.
Brain Ah Fuck or the full name brainahfuckohfuckwhydiditmultiplythevaluebytwopleasehelpmeihatethis is an esoteric programming language based on Brainfuck, but operating only on bits. It was made by User:Xarthan on June 2 2022 for only being pain.
Computational class
Brain Ah Fuck can be shown to be Turing-complete by reduction from brainfuck if I made it right.
Instructions
Brain Ah Fuck has the following commands:
Cmd | Description |
---|---|
s
|
Swap: sets 1 to 0 and 0 to 1 at the memory pointer |
0
|
0congoto: goto if 0 |
1
|
1congoto: goto if 1 |
>
|
Move right: Move data pointer right |
<
|
Move left: Move data pointer left |
.
|
Output: Output bit at data pointer |
,
|
Input: Input to data pointer moving right every bit |
Note: Trying to print any cell that is below id zero will halt.
Other note: Input starts at the least significant bit
Examples
Cat
A cat program writes its input directly to its output.
,<.0(2)1(2)
Hello, world!
A Hello, world! program is a trivial program which outputs a static string of text, usually
//set mem >s>>>s>>>>>s>s>>>s>>s>>s>s>>s>s>>>>s>s>>s>s>>>>s>s>>s>s>s>s>>>s>>s>s>>>>>s>>>>>>>s>s>s>>s>s>s>>s>s>>s>s>s>s>>s>s>s>>>s>>>s>s>>s>s>>>>s>s>>>s>>>>>s>>>>> //go to 0 s1(0) //print 104 bits (ascii values) .>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.>.
See also
Other languages operating on bits (implemented only):