Home Jensen Archive jWiki Jensen News Jensen Cloud Jensen Programming Jensen Family Tree JensenDiary
Math
BrainFuck is a numbering system created by Ian Bowen and Gerard Jensen to express the way people on the BrainFuck planet counted.
The main characteristic of this system is that no all the positions have the same base. Instead, there is an alterning form of 4, 3 and 10. This was intended to represent the solution BrainFuckers gave to their planet. As there were 4 berrys on every branch, 3 branches per bush, 10 bushes per root, 4 roots per valley, 3 valleys per region and so on. Therefore, a number would represent the number of total berries.
Ian afffirmed that this was a copy of the american length system.
The metabase is the alternating bases per digit. It's notation is a capital M with the metabase digits as a subindex.
Here you can see the frist 12 numbers.
M10 | M{4, 3, 10} |
1 | 1 |
2 | 2 |
3 | 3 |
4 | 10 |
5 | 11 |
6 | 12 |
7 | 13 |
8 | 20 |
9 | 21 |
10 | 22 |
11 | 23 |
12 | 100 |
There are only four methods that can be used. Here is the most ocmplex example that can ever been made.
BrainFuck converter = new BrainFuck();
converter.setBases(new int[]{4, 3, 10}); // {4, 3, 10} is the default so this line is unnecessary
converter.setChars("0123456789"); // "0123456789" is the default so this line is unnecessary
System.out.println(converter.decimalToBrainFuck(100)); // Output: 64
System.out.println(converter.brainFuckToDecimal("-64")); // Output: -100
Last update: 26/03/2024 22:39:50 UTC