A simulator is a program that imitates a machine: it keeps the machine’s state in its own variables and changes it, step by step, as the machine would.
sum_array.toy. The top six bits of the first byte are the operation code, the bottom two the register: LOADR R3, R1.PC, decodes and executes; it stops at HALT, or with an error that names the cause.