To summarize previous posts: the universe in which we live is a computer simulation, written by digital life forms inhabiting one of many very large digital computers. Each computer is a 2-dimensional Turing Machine, having 2 ^ 16 = 65,536 columns and a total of 2 ^ 65,536 bits, so the no. of rows = 2 ^ (65,536 - 16) = 2 ^ 65,520 (it's actually a one-dimensional Turing Machine, but thinking of it as a grid instead of a long tape is more intuitive). The word size of each computer = 65,536 bits and the size of the address needed to index every possible row = 65,520 bits. The total no. of these computers that exist = the total of all possible initial memory configurations = 2 ^ (2 ^ 65,536). Another way of writing this number is a stack of 6 twos slanting up and to the right = 2 raised to the power of (2 raised to the power of (2 raised... etc.)). Let M = total no. of bits x total no. of clock cycles (each computer runs for a maximum of 2 ^ 65,536 clock cycles). Then M = 2 ^ [2 ^ (2 ^ 16) + 2 ^ (2 ^ 5)] = roughly 10 ^ (10 ^ 20,000). To imagine that number, think of the no. 10 raised to the power of not 10, not 10 squared, not 10 cubed, but quantity 10 multiplied by itself 20,000 times!
Each 2-dimensional Turing Machine has 3 tape-readers. The lowest-level tape-reader scans strings of 4-bit op codes. These strings occupy the top few rows of the memory grid (below the 16 registers, starting on the 17th row), and there is a maximum of 16,384 op codes per row. At this level, the Jump command has no operand, and transfers control to the beginning of the row 2 rows below the current row. An op code of zero transfers control to the beginning of the next row (unless it occurs at the beginning of the row, in which case control is transferred back to the very first op code). The tape-reader at this level reads 4 bits at a time, going from left to right. The op code it reads is copied into the op-code register, which then controls the next higher-level tape-reader (the mid-level tape-reader). Each bottom-level row of op-codes controls a different aspect of the mid-level tape-reader: decoding the program counter, testing to see if it's a Jump command, fetching the op code, fetching the jump distance if it's a jump, and adding the jump distance (which equals one if it's not a jump) to the program counter.
The mid-level tape-reader uses the same op codes as the bottom-level tape-reader, except for the Jump command. Its word size is 32 bits (one word per row, maximum of 2 ^ 32 rows). The most-significant bit is only a one if the current command is the Jump command, leaving the next 31 bits to represent the jump distance (plus or minus 2 ^ 30 rows). The op code in the current instruction is copied into the op code register, and controls the top-level tape-reader, which can traverse the entire memory grid (all 2 ^ 65,520 rows). The main advantage of including the mid-level tape-reader (instead of having just 2 levels) is to allow branching and jumping to be done in software, thereby simplifying the hardware.
As mentioned above, the 2-dimensional Turing Machine is actually a one-dimensional tape. Each tape-reader has an address of length 65,536 bits. The Up command subtracts a one-bit from the 17th least significant bit of its address. The Down command adds a one-bit to the 17th least significant bit of its address. The Next/Previous commands add/subtract one to/from the address, respectively (the least significant bit in a given row is on the left-hand edge of the grid).
A total of 8 data registers and 8 address registers occupy the top 16 rows of memory. The Move, Load, and Add commands each take 2 operands, each operand of 4 bits (points to a specific register). The Move command simply copies one register to another. The Add command adds the source register to the destination register, storing the result in the destination register (if both 4-bit operands are equal, it clears that register). The Load command takes its source data register and stores it in memory at the row pointed to by its destination address register. Alternatively, the Load command takes its source address register and fetches the row in memory that it points to into its destination data register. The accumulator is the 0th data register. The program counter is the 0th address register. The op code register is the 1st data register. The tape-reader address registers make up the 1st thru 3rd address registers.
There are 15 possible commands which control the position of the tape-readers and the contents of a one-bit register (for each tape-reader). The 15 commands include:
U - Up: move tape-reader up one row
D - Down: move tape-reader down one row
P - Previous: move tape-reader left one column
N - Next: move tape-reader right one column
M - Move: move register XY
L - Load: load register XY
A - Add: add register XY
R - Read: copy value of tape under tape-reader to flag register
W - Write: copy value of flag register to current location of tape
1 - Set: write a one-bit to current location of tape
0 - Reset: write a zero-bit to current location of tape
X - Not: perform Boolean Not operation on flag register
B - Branch: if flag register is zero, skip over next command
J - Jump: jump forward/backward up to 2 ^ 30 commands
Z - Zilch: skip this command (no operation)
Note that all commands (except Move, Load, Add, and Jump) are performed in one clock cycle. As of July 26 at 6:30 p.m., I have finished designing the hardware, but won't know for sure if I have a functioning computer until I start writing the low-level software. I'm going to take a break now.
You may be wondering, why do we need a ridiculously large number of massive, 2-dimensional Turing Machines to justify our existence? My answer to that is, I think it's elegant that all these big but clean and simple computers exist (if I am right), without the need for a mystical creator. It's also a lot simpler than what cosmologists have come up with, which to me cries out for the necessity of an intelligent creator, namely, the sentient digital life forms that wrote the computer simulation that is our (seemingly analog) universe.
Saturday, July 25, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment