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.
| Designed by | Linda Null and Julia Lobur |
|---|---|
| Book | The Essentials of Computer Organization and Architecture (first edition 2003) |
| Word size | 16 bits, two’s complement |
| Memory | 4,096 words (12-bit addresses), word-addressed |
| Instruction format | 4-bit opcode + 12-bit address |
| Registers | AC, MAR, MBR, PC, IR, InREG, OutREG |
| Instructions | 9 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:
| Register | Job |
|---|---|
AC | Accumulator: holds the working value |
PC | Program counter: address of the next instruction |
IR | Instruction register: the instruction being executed |
MAR | Memory address register: the address being read or written |
MBR | Memory buffer register: the data going to or coming from memory |
InREG, OutREG | Input 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
| Opcode | Instruction | What it does |
|---|---|---|
| 1 | Load X | AC ← memory[X] |
| 2 | Store X | memory[X] ← AC |
| 3 | Add X | AC ← AC + memory[X] |
| 4 | Subt X | AC ← AC − memory[X] |
| 5 | Input | Read a value into AC |
| 6 | Output | Send AC to the output |
| 7 | Halt | Stop |
| 8 | Skipcond | Skip the next instruction if AC is negative, zero or positive (chosen by the address bits) |
| 9 | Jump X | PC ← 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.