Type alias MinskyRegisterMachineInstruction
MinskyRegisterMachineInstruction: {
next: number;
register: number;
type: "INC";
} | {
nextIfNonZero: number;
nextIfZero: number;
register: number;
type: "DEC";
} | {
type: "HALT";
}
Type declaration
next: number
register: number
type: "INC"
Type declaration
nextIfNonZero: number
nextIfZero: number
register: number
type: "DEC"
Instructions for the Minsky Register Machine. INC increments a register and moves to the next instruction. DEC decrements a register if non-zero and branches accordingly. HALT stops the computation.