Little man computer

This image is a screen capture of a Little Man Computer program. The background colour is a vibrant purple, in the top left the program title reads “Little Man Computer Simulation” in white text. Below it sits a table of data, with columns with names such as “line”, “label”, “operator” and “operand”. In it lie various computer commands, such as “start” “loop” “finish” “number” “zero”. The centre of the image is occupied by a representation of the different parts a computer, connected by blue lines on a pink background. The different parts of the computer have different shapes and names, such as the orange box labelled “PC” or the green “V” shape labelled “ALU”. To the right of that is a black and grey table titled “MEMORY”, filled with various digits, presumably collected from the operation of the machine. Finally, below this lies a panel where the user can enter “inputs” to receive an “output” - this is next to another box titled “console” which records the operation of the machine, e.g. “ASSEMBLY: SYMBOL TABLE BUILT”.
Little Man Computer simulator

The Little Man Computer (LMC) is an instructional model of a computer, created by Dr. Stuart Madnick in 1965.[1] The LMC is generally used to teach students, because it models a simple von Neumann architecture computer—which has all of the basic features of a modern computer. It can be programmed in machine code (albeit in decimal rather than binary) or assembly code.[2][3][4]

The LMC model is based on the concept of a little man shut in a closed mail room (analogous to a computer in this scenario). At one end of the room, there are 100 mailboxes (memory), numbered 0 to 99, that can each contain a 3 digit instruction or data (ranging from 000 to 999). Furthermore, there are two mailboxes at the other end labeled INBOX and OUTBOX which are used for receiving and outputting data. In the center of the room, there is a work area containing a simple two function (addition and subtraction) calculator known as the Accumulator and a resettable counter known as the Program Counter. The Program Counter holds the address of the next instruction the Little Man will carry out. This Program Counter is normally incremented by 1 after each instruction is executed, allowing the Little Man to work through a program sequentially. Branch instructions allow iteration (loops) and conditional programming structures to be incorporated into a program. The latter is achieved by setting the Program Counter to a non-sequential memory address if a particular condition is met (typically the value stored in the accumulator being zero or positive).

As specified by the von Neumann architecture, any mailbox (signifying a unique memory location) can contain either an instruction or data. Care therefore needs to be taken to stop the Program Counter from reaching a memory address containing data - or the Little Man will attempt to treat it as an instruction. One can take advantage of this by writing instructions into mailboxes that are meant to be interpreted as code, to create self-modifying code. To use the LMC, the user loads data into the mailboxes and then signals the Little Man to begin execution, starting with the instruction stored at memory address zero. Resetting the Program Counter to zero effectively restarts the program, albeit in a potentially different state.

  1. ^ "Little Man Computer". Illinois State University. May 1, 2000. Archived from the original on February 27, 2009. Retrieved March 8, 2009.
  2. ^ Yurcik, W.; Osborne, H. (2001). "A crowd of Little Man Computers: Visual computer simulator teaching tools". Proceedings of the 2001 Winter Simulation Conference (Cat. No.01CH37304). Vol. 2. p. 1632. doi:10.1109/WSC.2001.977496. ISBN 0-7803-7307-3. S2CID 18907923.
  3. ^ Yurcik, W.; Brumbaugh, L. (2001). "A web-based little man computer simulator". Proceedings of the thirty-second SIGCSE technical symposium on Computer Science Education - SIGCSE '01. p. 204. doi:10.1145/364447.364585. ISBN 1581133294. S2CID 14794750.
  4. ^ Osborne, H.; Yurcik, W. (2002). "The educational range of visual simulations of the Little Man Computer architecture paradigm". 32nd Annual Frontiers in Education. pp. S4G–S19. doi:10.1109/FIE.2002.1158742. ISBN 0-7803-7444-4. S2CID 10324295.