## An Interesting Calculator Machine Thingy

Instructions

Shift-Click the flag. Make sure it says "Turbo Mode".
Click the green flag if the program didn't start already.
Watch the numbers in the "Variables" List grow to infinity and beyond!! (Just kidding).
Click "See Inside" to see how it works.
Read the Notes and Credits below.

Notes and Credits

Where I got the project idea:
http://precollegiate.stanford.edu/circle/math/notes08f/bignumbers.pdf
Imagine a calculator that has a bunch of
variables in it, (say, A, B, C, . . . , all of which are initially zero), and only allows the following sorts of
operations:
• A + + Increment the value of variable A by 1.
• A − − Decrement the value of variable A by 1 unless A = 0.
• A :: x If A 6= 0 go to line number x; otherwise, continue to the next line.
Here is a 23 line program written in the language above.
1: E + +
2: E + +
3: E + +
4: E + +
5: B + +
6: A − −
7: A :: 5
8: A + +
9: A + +
10: B − −
11: B :: 8
12: C − −
13: C :: 5
14: C + +
15: A − −
16: A :: 14
17: D − −
18: D :: 5
19: D + +
20: C − −
21: C :: 19
22: E − −
23: E :: 5
Try to figure out how large the numbers A, B,
C, D, and E (in my program, the items in the "Variables" list) get by the time the program terminates. It is fairly impressive, given that essentially the only
allowable operations are “add one”, “subtract one”, and “branch if non-zero”.

I figured it out: in the end (if you wait until the end of the world for this thing to finish) , item 4 in the variables list will become 2^2^2^2^2^...^2^2, with 65536 2's. Now that is insanely large!

Shared: 10 Aug 2016 Modified: 13 Aug 2016

More projects by MrRubiksSC