CPU Simulator

Von Neumann architecture · Fetch–Decode–Execute
FETCH
DECODE
EXECUTE
HALTED

Von Neumann architecture

The same main memory stores program instructions and data. Follow each transfer through the processor.

STORED-PROGRAM MODEL
Central Processing Unit (CPU) processing · control · CPU memory
Processing & Control non-memory components
Control Unit (CU)
coordinates and decodes
CU activity
Waiting for the next processor step.
Interpreting current value as —
Arithmetic Logic Unit (ALU)
arithmetic and logical operations
ALU activity
Idle — no arithmetic operation
CPU Memory very fast storage
Register bank tiny, very fast memory locations
ACC
Accumulator
working value / result
0
MAR
Memory Address Register
address currently being accessed
—
PC
Program Counter
address of next instruction
1
MDR
Memory Data Register
instruction / data being transferred
—
Cache
CPU memory
empty
Address bus
Data bus
Control bus
Main Memory (RAM) instructions + data
AddressContents
Stored-program principle: program instructions and data occupy addresses in the same memory.
Instruction Data
Current instruction: not yet fetched