Chapter 1-6

By Mourya
1.Structure of BF

The BF language is actually made of an array of size 30,000.Each cell occupies one byte,so its range is actually from 0-255.

[0][4][67][1][55][255][23][0]
^
So the ^ symbol actually indicates the present location in the program.

2.The Operators

The basic idea behind brainfuck is memory manipulation.Brain fuck has only 8 operators that are all written in single characters.Even though BF is restricted to these 8 characters and strictly restrictive any program that can be written in c can be written in brain fuck.

The eight operators are

* + increase byte under pointer
* - decrease byte under pointer
* > increase pointer
* < decrease pointer
* [ start a loop if byte under pointer is not 0
* ] return to matching [
* . print byte under pointer to standard output (often screen)
* , read input from standard input (often keyboard) to byte under pointer

3.The Arithematic calculations

1.Addition
2.Subtraction
3.Multiplication
4.Division

1.Structure of BF

The BF language is actually made of an array of size 30,000.Each cell occupies one byte,so its range is actually from 0-255.

[0][4][67][1][55][255][23][0]
^
So the ^ symbol actually indicates the present location in the program.

2.The Operators

The basic idea behind brainfuck is memory manipulation.Brain fuck has only 8 operators that are all written in single characters.Even though BF is restricted to these 8 characters and strictly restrictive any program that can be written in c can be written in brain fuck.

The eight operators are

* + increase byte under pointer
* - decrease byte under pointer
* > increase pointer
* < decrease pointer
* [ start a loop if byte under pointer is not 0
* ] return to matching [
* . print byte under pointer to standard output (often screen)
* , read input from standard input (often keyboard) to byte under pointer

3.The Arithematic calculations

1.Addition
2.Subtraction
3.Multiplication
4.Division

 

0 comments so far.

Something to say?