Nearly all modern computers work in the same way: They have a way to get input from a user. They...

10
Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have a way to process the data based on the instructions. They have a way to output the result. Interesting extras: Little Man Computer (LMC) Von Neumann architecture

Transcript of Nearly all modern computers work in the same way: They have a way to get input from a user. They...

Page 1: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Nearly all modern computers work in the same way:

They have a way to get input from a user.

They have somewhere to store instructions and data

They have a way to process the data based on the instructions.

They have a way to output the result.

Interesting extras: Little Man Computer (LMC)

Von Neumann architecture

Page 2: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Obviously modern computers are very complicated, which can make it hard to understand how they work.

The Little Man Computer (LMC) is a simulation created to make it easier to understand how a computer works.

The Little Man Computer is just a very, very simple version of a real computer.

The LMC visualises the computer as a Little Manwho executes programs by running around fetching input, storing it, using a calculator to process it then outputting answers to the user.

Interesting extras: Little Man Computer (LMC)

Little Man Computer

Page 3: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Instead of the keyboard or mouse that a real computer uses to get input from a user the LMC has an inbox.

The Little Man checks his inbox whenever he needs some information from the user.

Interesting extras: Little Man Computer (LMC)

LMC input devices

In-box

Page 4: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Instead of the monitor or speakers that a real computer uses to output information to a user the LMC has an outbox.

The Little Man places any information he wants to give you in to his outbox.

Interesting extras: Little Man Computer (LMC)

LMC output devices

Out box

Page 5: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Instead of the RAM that a real computer uses to store data and instructions the LMC has a set of 100 mailboxes (labeled 0-99).

The Little Man keeps anything he needs like data or instructions in these mailboxes.

Interesting extras: Little Man Computer (LMC)

LMC storage devices

9903

20 1

….

Page 6: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Instead of the processor that a real computer uses to work things out the LMC use a calculator called the accumulator. The accumulator is pretty rubbish as it can only add or subtract.

The Little Man uses his accumulator to add or subtract numbers when he needs to.

Interesting extras: Little Man Computer (LMC)

LMC processor

Accumulator

Page 7: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

The Little Man is pretty busy and needs to keep track of which instruction to execute next.

To do this he uses diary called a program counter to tell him which mailbox to look in to get his next instruction.

Everytime he completes an instruction the program counter updates to point to the mailbox with the next instruction.

Interesting extras: Little Man Computer (LMC)

Little Mans job list

Next instruction is in Mailbox 4

Page 8: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

Interesting extras: Little Man Computer (LMC)

Little Man Computer

Little Mans inbox that he gets data from.

Little Mans outbox where he puts his answers.

Little Mans mailboxes where he stores data and

instructions.

Little Mans accumulator (calculator) that he uses

to add or subtract.

Little Mans Program Counter that tells him which mailbox his next

instruction is in.

Page 9: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

The LMC is easy to program, you just give the Little Man a sequence of instructions to follow.

A normal computer responds to thousands of instructions but because the LMC is so basic there are only a few the Little Man understands.

Interesting extras: Little Man Computer (LMC)

Programming the LMC

Page 10: Nearly all modern computers work in the same way: They have a way to get input from a user. They have somewhere to store instructions and data They have.

LMC instructions