Little Man Computer
Little Man Computer - LMC - is a simulator that mimics the modern computer architecture, known as von Neumann architecture. It was a brainchild of Dr Stuart Madnick, invented in 1965;
Since it can model the modern computer, it is still widely used as a teaching tool and should help students understand aspects of the Von Neumann Architecture.
This will help students understand the inputs, outputs, control unit, logic unit, memory and the bus connecting it all together.
The little man’s instruction set:
These are all the instructions the little man can execute.
Instruction | Mnemonic | Machine Code |
Load | LDA | 5xx |
Store | STA | 3xx |
Add | ADD | 1xx |
Subtract | SUB | 2xx |
Input | INP | 901 |
Output | OUT | 902 |
End | HLT | 000 |
Branch if zero | BRZ | 7xx |
Branch if zero or positive | BRP | 8xx |
Branch always | BRA | 6xx |
Data storage | DAT |
|
xx refers to a Mailbox number (Memory Address)
Example (Using Machine Code)
Address | Instruction | What it does: | |
Mnemonic | Machine Code | ||
00 | INP | 901 | Input a number and put it in the calculator |
01 | STA 99 | 399 | Store the number in the calculator in memory slot 99 |
02 | INP | 901 | Input a number and put it in the calculator |
03 | ADD 99 | 199 | Add the number in memory slot 99 to the number in the calculator |
04 | OUT | 902 | Output the number which is now in the calculator |
05 | HLT | 000 | Halt |
Lesson Resources