The switches are organized into a binary tree of depth 65,519. Each leaf of the binary tree points to a linear array of 65,519 switches. There are 2 special kinds of switches: a termination switch, in which the right pointer is null, and a bit-writing switch, in which the left pointer is null. For any switch, if the switch is on, the left pointer is active. If the switch is off, the right pointer is active.
At the top of memory there are 16 registers of length 65,519 bits: 8 data registers and 8 address registers. Two special data registers are the accumulator and the instruction register. A special address register is the program counter. During each iteration of the main loop, the following operations take place:
- Decode the program counter
- Fetch one bit of memory into the instruction register
- If that bit is zero, fetch the op code from memory into the instruction register
- If that bit is one, fetch the op code and 65,519 bits from memory into the instruction register and the instruction operand data register, respectively
- Decode the instruction register
- Perform the instruction
- If the most significant bit in the instruction register is a zero, increment the program counter
- Else if the instruction evaluates to true, copy the instruction operand data register into the program counter
- Else increment the program counter
When the switches are being traversed, there is only a small no. (say up to 16) of possible instructions, performed at a particular switch:
- 0 - Write a zero
- 1 - Write a one
- W - Write value of current flag
- R - Read the switch (follow it)
- R' - Read the opposite of the switch (follow inactive pointer)
- T - Toggle the switch
- If current switch is a closed termination switch, open it and then follow it: 0, R'
- Keep on doing that until there are no more closed termination switches
No comments:
Post a Comment