Play free

2003 · Linda Null and Julia Lobur

MARIE

MARIE stands for Machine Architecture that is Really Intuitive and Easy, and it lives up to the name. One accumulator, one address per instruction, and a register for every step of the fetch-decode-execute cycle, so students can watch it happen.

2 min read · Updated

Designed byLinda Null and Julia Lobur
BookThe Essentials of Computer Organization and Architecture (first edition 2003)
Word size16 bits, two’s complement
Memory4,096 words (12-bit addresses), word-addressed
Instruction format4-bit opcode + 12-bit address
RegistersAC, MAR, MBR, PC, IR, InREG, OutREG
Instructions9 in the basic set, extended to about 15 with indirect and subroutine instructions

Why it was built

Linda Null and Julia Lobur wrote The Essentials of Computer Organization and Architecture for students meeting computer hardware for the first time. They wanted a machine that showed the core ideas, registers, memory, the fetch-decode-execute cycle and the bus between them, without the clutter of a commercial processor. MARIE is that machine. It has gone through several editions of the book, and free simulators let students write and step through programs right away.

How it works

MARIE is an accumulator machine: almost every operation works on one register, AC, and one word in memory. Memory holds 4,096 words of 16 bits. An instruction is a single word, with a 4-bit opcode on top and a 12-bit address below, which is exactly enough to reach any word in memory.

What makes MARIE good for teaching is that it names the registers that real CPUs usually hide:

RegisterJob
ACAccumulator: holds the working value
PCProgram counter: address of the next instruction
IRInstruction register: the instruction being executed
MARMemory address register: the address being read or written
MBRMemory buffer register: the data going to or coming from memory
InREG, OutREGInput and output registers

Each instruction is described as a short sequence of register transfers. Fetching is always the same: copy PC into MAR, read memory into IR, add one to PC. Then decode, then execute. For the bigger picture, see how a CPU works.

The instruction set

OpcodeInstructionWhat it does
1Load XAC ← memory[X]
2Store Xmemory[X] ← AC
3Add XAC ← AC + memory[X]
4Subt XAC ← AC − memory[X]
5InputRead a value into AC
6OutputSend AC to the output
7HaltStop
8SkipcondSkip the next instruction if AC is negative, zero or positive (chosen by the address bits)
9Jump XPC ← X

The extended set adds JnS (jump and store, for subroutines: the return address is saved in the first word of the subroutine), Clear, and indirect forms such as AddI and JumpI, which follow a pointer in memory. Later editions add LoadI and StoreI too.

There is only one conditional instruction, Skipcond, so an if statement becomes “skip the jump unless…”. It is clunky, and that is the point: students see exactly what a compiler has to do.

Why it matters

MARIE is deliberately not fast or powerful. It is a glass box. Students who have traced a few programs through MAR and MBR understand what “fetch, decode, execute” really means, and every larger architecture they meet later looks like a variation on the same theme. Its subroutine trick, storing the return address inside the subroutine, is the same one the PDP-8 used decades earlier.

MARIE in NANDSIM

The museum MARIE is rebuilt from NAND gates and runs real MARIE programs. Open it up to inspect AC, MAR, MBR and memory as each instruction is fetched and executed.

Run MARIE live