Level 2Computational efficiencyWork it out
Count the clock
Every Bench-8 instruction spends 5 cycles on fetch and decode, then 0–3 execute cycles: LDI, IN, OUT, JMP, JZ, JC, NOT and HALT take 1; LDA and STA take 2; ADD, SUB, AND, OR and XOR take 3; NOP takes 0.
Run with the input tape 4, 5. How many conceptual clock cycles pass from reset until HALT completes?
New to this? Silicon Studio 14: Fetch, decode, execute
How results are computed: model assumptions.
IN
STA x
IN
ADD x
OUT
HALT
x: DB 0