Fetch-Execute Cycle

Step through the MARIE CPU cycle: Fetch → Decode → Execute, watching registers update in real time.

FETCH
LOAD 004
CPU Registers
PC
000
MAR
000
MBR
0000
IR
0000
AC
0000
Micro-Steps (Cycle 1)
1MAR ← PC (000)
2MBR ← M[MAR] (1004)
3IR ← MBR (1004)
4PC ← PC + 1 (001)
5Decode: opcode = LOAD, operand = 004
6MAR ← 004
7MBR ← M[MAR] (005)
8AC ← MBR (005)
Memory
AddrLabelHexSource
0001004LOAD X
0013005ADD Y
0022006STORE Z
0037000HALT
004X0005X, DEC 5
005Y0003Y, DEC 3
006Z0000Z, DEC 0
About the Fetch-Execute Cycle
Every instruction in the MARIE CPU goes through three phases: Fetch (load instruction from memory into IR via MAR/MBR), Decode (extract opcode and operand from IR), and Execute (perform the operation, updating AC or memory). Use Micro Step to advance one register transfer at a time, or Full Step to execute an entire instruction. The highlighted registers show which are being read (blue) or written (green) at each micro-step.