kind = sequential
immutable_isa = true
no_score = true
size = 128
unlocks_pages = ["Computer concepts/Turing complete"]
copy_solution_to_level = ["binary_programming", "overture_6_budget"]
title = (31337_59169726539090, `Turing Complete`)
dialogue = [
  (mentor_centered, (31337_77166984247940, `Until this point all possible programs have been confined to running in order byte by byte.`)),
  (mentor_centered, (31337_85320707451673, `Before, only code could influence memory, now memory must influence code. With the addition of conditional logic, our computer can run any algorithm, and calculate anything calculable. Like all non-theoretical computers, this machine will only be limited by having finite memory.`)),
  (mentor_centered, (31337_89085328104477, `The final thing we need to add is a mechanism for changing the program counter through instructions when certain conditions are met.

When the two largest bits are [T][T], we are in condition mode. In condition mode, the value in REG 3 is compared against the conditions defined by the lowest 3 bits in the instruction. If the condition is true, we overwrite the counter to the value in REG 0.
Conditionally changing the counter means we can skip instructions based on conditions or have instructions run in a loop.

Conditions:[left]
                    [F][F][F] Never
                    [F][F][T] Always
                    [F][T][F] If [color=#e49f44]REG 3[/color] = 0
                    [F][T][T] If [color=#e49f44]REG 3[/color] ≠ 0
                    [T][F][F] If [color=#e49f44]REG 3[/color] < 0
                    [T][F][T] If [color=#e49f44]REG 3[/color] ≥ 0
                    [T][T][F] If [color=#e49f44]REG 3[/color] ≤ 0
                    [T][T][T] If [color=#e49f44]REG 3[/color] > 0
[/left]
These conditions correspond to the condition component that was saved in the foundry.`)),
  (overture)
]
post_mortem = [
  (mentor_smile, (31337_27747401844990, `You did it! I thought you were just this odd looking hairless ape creature, but you actually built a real computer! Amazing.`)),
]
