Source: Cathode-Ray Tube
Part 1
Implement a simple virtual machine with two instructions:
nop
which does nothing for 1 cycles andaddx $n
which adds$n
to theX
register (initial value 1) in two cycles. Calculate the sum ofcycle * X
for the cycles 20, 60, 100, 140, 180, 220.