Here's a 41-character program that eventually halts, leaving more than 10↑(10↑28) contiguous cells set equal to 1 (so the number of instructions executed is very much greater than that):
>+>+>+>+[->[>]+[->[>]+[->[>]+[<]+<]+<]+<]
If I'm not mistaken, that's a correct translation of the following program in the BF-variant language that uses a single bit for each memory cell (i.e., cell content 0..1 instead of 0..255, so '+' acts to simply flip the bit-value):
>+>+>+>+[+>[>]+[+>[>]+[+>[>]+[<]+<]+<]+<]
The exact value (the number of adjacent 1-bits) produced by the latter program is
3 * (2 ↑ 118842243771396506390315925503 - 1) + 1.
The above program initializes & computes a function that grows like 2↑↑x (in
Knuth up-arrow notation). Similar conversion of a variant-BF program that initializes & computes a function that grows like 2↑
23x provides the following 256-character program:
>+>+>+>+>+>+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[->[>]+[<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+<]+
which eventually halts, leaving more than 2↑236 adjacent cells set equal to 1 (so the number of steps is enormously more than that).
NB-1: 2↑236 is an "inconceivably large" number; e.g., even 2↑46 = 2↑↑↑↑6 already surpasses the first term (3↑↑↑↑3) in the sequence used to compute Graham's number.
NB-2: I think it's likely that 256 characters is enough for a BF program to initialize & compute a function with output much larger than Graham's number — if I find time, maybe I'll try to write one.
NB-3: In case anyone is interested in the origin of the above programs, here are some programming resources for "Brainf*ck F", with various programs written in Python. ("Brainf*ck F", or just "F", is what I called a Turing-complete variant of the Smallf*ck esolanguage.) I just now uploaded these files, which have been offline for several years, and for now the linked webpage is just a "file cabinet" -- see the file Busy_Beavers.txt for a detailed discussion relevant to the above programs.
float
ordouble
primitives used for general everyday computing. (At that point the computer is mostly just manipulating strings of that represent the equation) \$\endgroup\$ – AJMansfield Jul 12 '13 at 13:17