Brainfuck

Aus ProgrammingWiki
Archivierte Version vom 2019-10-24T10:56:50+00:00. Aktuelle Version

Die Programmiersprache Brainfuck ist keine ernsthafte Programmiersprache, sie gilt aber mit ihren wenigen Befehlen dennoch als Turing-complete und kann damit theoretisch alles berechnen, was mit anderen Programmiersprachen auch möglich ist.

Brainfuck kennt die folgenden 8 Befehle:

> = increases memory pointer, or moves the pointer to the right 1 block.
< = decreases memory pointer, or moves the pointer to the left 1 block.
+ = increases value stored at the block pointed to by the memory pointer
- = decreases value stored at the block pointed to by the memory pointer
[ = like c while(cur_block_value != 0) loop.
] = if block currently pointed to's value is not zero, jump back to [
, = like c getchar(). input 1 character.
. = like c putchar(). print 1 character to the console

Hier ein Hallo World! Programm in Brainfuck:

Zur Hilfestellung die ASCII-Tabelle:

DezASCII
0NUL
1SOH
2STX
3ETX
4EOT
5ENQ
6ACK
7BEL
8BS
9HT
10LF
11VT
12FF
13CR
14SO
15SI
16DLE
17DC1
18DC2
19DC3
20DC4
21NAK
22SYN
23ETB
24CAN
25EM
26SUB
27ESC
28FS
29GS
30RS
31US
DezASCII
32SP
33!
34"
35
36$
37%
38&
39'
40( 
41 )
42
43+
44,
45-
46.
47/
480
491
502
513
524
535
546
557
568
579
58
59
60<
61=
62>
63?
DezASCII
64@
65A
66B
67C
68D
69E
70F
71G
72H
73I
74J
75K
76L
77M
78N
79O
80P
81Q
82R
83S
84T
85U
86V
87W
88X
89Y
90Z
91[
92\
93]
94^
95_
DezASCII
96`
97a
98b
99c
100d
101e
102f
103g
104h
105i
106j
107k
108l
109m
110n
111o
112p
113q
114r
115s
116t
117u
118v
119w
120x
121y
122z
123{
124|
125}
126~
127DEL