Posts

The Real Thing

In the previous post I talked about the LMC as a model. After understanding how the Little Man works it’s time to grow, and use more “realistic” terms. The LMC is a simplified model of how the computer works. The following is a list of what we find inside a computer:

  • MAR: Memory Address Register
  • MDR: Memory Data Register
  • IR: Instruction Register
  • PC: Program Counter
  • A: Accumulator, also known as the GPR, General Purpose Register
  • I/O: Input / Output

Because the Computer doesn’t hold actual “memory” as people do, we have to use a special register to “remember” what instruction is being executed; this is what the IR is for. The PC plays the same role as the counter in the LMC and the A is equivalent to the calculator. The MAR and the MDR can be described as the mail boxes. Where the MAR is the number of the mail box, and the MDR is the actual message inside that mail box.

The system works in a “Fetch-Execute Instruction Cycle.” As the name suggests the instruction is read, and then executed and after that the next instruction is read. It is based upon the transfer of data from one register to another. The Fetch cycle starts with the PC, the number is transferred to the MAR. The data in the MAR runs through a decoder, “lighting up” the particular line in memory where the MDR reads it and stores it. The Data in the MDR is transferred to the IR. The fetch part of the cycle is complete. The execute part of the cycle starts here. Depending on what the instruction is the computer executes it. If the instruction was to load a particular address, the data would then flow from the IR to the MAR, the same process happens in lighting up the line with that particular address.  It is stored in the MDR and then the data is transferred to the A. The execute part of the cycle is complete, now the program counter is updated and goes on to continue the cycle by fetching for the next instruction.

 

Little Man Computer

It has been a while since I last posted anything. Anyways, today I am going to write about the Little Man Computer (LMC). The LMC is a program that visually helps students understand how a computer works, it was created Dr. Stuart Madnick in 1965.

The little man has a calculator, a counter, In and Out baskets and a 100 mailboxes with zero based numbering. He opens each mail box, reads the OP-Code (operation Code) and executes that specific operation. This is what he can do:

  • Load
  • Store
  • Add
  • Subtract
  • Input
  • Output
  • Branch on Zero
  • Branch on Positive
  • Branch Unconditionally
  • Coffee Break / Halt

Combing these operations in a specified way create a program which runs the computer, essentially this is all what the computer does. The only true operations is add and subtract, the rest is either moving data around or branching to read other data.

The LMC model is useful for understanding the Von Neumann Architecture. There are three main guidelines that define this architecture. It includes the stored program concept, in which memory can hold both data and programs; in which the programs can be easily accessed and changed.  Also “memory is addressed linearly,”  in laymen terms memory locations are assigned a numeric address.  The third major guidline is the memory location has nothing to do with the data within that location.