teach-ict.com logo

THE education site for computer science and ICT

2. LMC Computer

The LMC was designed to model a very basic Von Neumann computer.


There are some free LMC simulators available (e.g. York University, Canada) which will load a LMC assembly language program then convert it into the equivalent numeric codes and run it step by step.

They do vary from one another so some details will depend on which one your school is using, for example some simulators allow negative numbers in the accumulator, some don't.


Although a real computer uses binary numbers, usually coded as hexadecimal numbers in assembler, for simplicity, the LMC instruction values are always in decimal.

The elements of the machine are shown below

LMC Little Man Computer model

The machine consists of:

INBOX: This behaves like an input value from the user.

OUTBOX: This represents an output value. Only three digits are allowed, so the maximum value is 999 decimal.

ACCUMULATOR: This holds a temporary value that is manipulated by operations such as add and subtract and so on.

REGISTERS: Values are stored in memory locations called registers, this includes the program itself (after all this is a von neumann machine). They are refered to by their location, ranging from location 00 up to location 99

NEGATIVE FLAG: This is set if the result of an operation in the accumulator is negative. (Some simulators only allow positive 000 -> 999 in the accumulator, but the negative flag is still set properly)

PROGRAM COUNTER: Holds the address of the next instruction. Lowest address 00, highest address 99

ADDRESS REGISTER: Holds the bottom two digits of the instruction just read from memory

INSTRUCTION REGISTER: Holds the top digit of the instruction just read from memory

The LMC assembly language is used to instruct this machine, step by step.

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What is the LMC Little Man Computer