Title: 2. A Brief History of Computing and the LMC
12. A Brief History of Computing and the LMC
2Review Course Concepts
3Wiki Weekly Comment Demo
- Log in
- Go to page for this week
- Click edit
- Edit
- Preview
- Save
4Learning objectives
- Know something about the evolution of computing
- Understand how computer operates at lowest level
- Provides analogies for understanding
representation, architecture, operating systems
in future classes
5A Brief History of Computing
- In which we find that computers are misnamed.
- For a more complete history, see Campbell-Kelly,
M., Aspray, W. (1996). Computer a history of
the information machine. ( ed.). New York, NY
BasicBooks.
6At the start, it was a good name
- The word computer was first used to refer to a
person employed to make calculations. - The meaning was extended to include mechanical
calculating devices, such as slide rules, adding
machines, etc. - Inputs
- Compute
- Outputs
- Examples
- Solving complex equations
- Calculating trajectories
7From Computer to Information Machine
- Today, the ability to perform calculations is
secondary - Electronic computers primary function is the
storage and manipulation of information
8Storage and Interactivity
- Combining calculation and storage allows
- Aggregation of inputs over time
- Delayed output
- Human involvement closes the loop
- Input
- Output
- More input
9The Modern Electronic Computer
- Modern computers rely on this combination of
capabilities for most tasks. - Word processing
- Financial analysis, payroll, and accounting
- Data management
- The way that we interact with these machines has
also evolved.
10Multi-tasking
- Early computers were very expensive
- One computer shared by many people
11Graphical User Interfaces
- GUI versus command line
- WIMP
- Windows
- Icon
- Mouse
- Pointer
12Networked Computers
- Move (communicate) data
- Using phone lines, network wires, wireless, etc.
13Current Trends
- Mobility
- Ubiquity
- Embedding
14Technical Enablers
- Better Engineering
- Moores Law
- Double the performance every 12-18 months
- Infrastructure Investment
15Individual Reflection
- What strengths (skills, experiences, etc.) do you
bring to the class? - What is your biggest concern regarding this
class? - What could you contribute to a study group?
- What would you hope to get out of a study group?
16LMC A Simplified Computer
- Input/Output (input and output conveyors)
- Memory (blackboard)
- 100 locations
- Each holds a 3-digit number and is identified by
its address (between 0 and 99) - Processor
- Calculator (sometimes called a register)
- Instruction Location Counter
- Keeps track of what instruction to execute next
- Two digits
- What is maximum of instructions in one
script/program?
17The Little Man
- Little body (fits inside the computer)
- Little brain
- only simple instructions in script
- can't even add 22 without a calculator
- can't remember anything
- Big on obedience always follows instructions
18What the Little Man Does
- Look at instruction location counter
- Go to corresponding blackboard location and read
instruction - Perform indicated operation
- Advance instruction counter by 1
- Don't need calculator for this clicker built
into instruction counter - Skip this step for some instructions (branches,
about to be introduced) - Repeat until told to stop
19The Instructions
- Processing instructions
- Add (calculator value from memory location)
- Subtract (calculator value from memory
location) - Memory instructions
- Store (calc. ? memory location)
- Load (calc. ? value from memory location)
- Input/Output instructions
- Get (input belt ? calculator)
- Put (calculator ? input belt)
- STOP
20Programs (Scripts)
- A sequence of instructions
- So precise even the little man can follow the
instructions - Example Add two numbers
- Is this a program?
21From Flowchart to Program
- Add (calculator value from memory location)
- Subtract (calculator value from memory
location) - Store (calc. ? memory location)
- Load (calc. ? value from memory location)
- Get (input belt ? calculator)
- Put (calculator ? output belt)
For class to work on
22Revised Program
- 0. Get Get first number
- 1. Store 06 Store first number in location 6
- 2. Get Get second number
- 3. Add 06 Add second number (from location 6)
to contents of calculator - 4. Put Write answer on Post-It put on output
- 5. Stop
23Instructions in Memory
- Assign a number to each possible instruction
- Has to fit in 3 digits
- How many instructions could we have?
- But some instructions need to specify a memory
location - First digit says what to do
- Next two digits specify where
- Are two digits enough?
- How many instruction types can you have?
24The Instruction Codes
- Processing instructions
- 1xx Add (calculator value from memory location)
- 2xx Subtract (calculator value from memory
location) - Memory instructions
- 3xx Store (calc. ? memory location)
- 5xx Load (calc. ? value from memory location)
- Input/Output instructions
- 901 Get (input belt ? calculator)
- 902 Put (calculator ? output belt)
- 000 STOP
25Exercise Write the Program Using the Instruction
Codes
- 0. Get
- 1. Store 06
- 2. Get
- 3. Add 06
- 4. Put
- 5. Stop
1xx Add 2xx Subtract 3xx Store 5xx Load 901
Get 902 Put
26Revised Program
- Address Instruction Description
- 000 901 Get
- 001 306 Store 06
- 002 901 Get
- 003 106 Add 06
- 004 902 Put
- 005 000 Stop
27The LMC Simulator
- In DIAD Lab
- Install through NAL
- LMC should appear on your start menu
- Or download zip file from CourseTools
Run NAL. Download add2.lmc from CourseTools
28Branch Instructions
Spend significant time on this.
- Branch instructions change the value in the
instruction counter - Unconditional branch sets instruction counter to
new value - Branch Zero changes IC only if calculator has
value 0 - Branch Positive changes IC only if calculator has
value gt 0 - Calculator has a "zero" light and a "positive"
light so little man can tell - Branch Zero and Branch Positive increment
instruction counter by 1 if branch not taken - Do branch instruction codes need to save 2 digits
for memory locations?
29The Instructions (complete)
- 000 STOP
- 1xx Add
- 2xx Subtract
- 3xx Store
- 5xx Load
- 6xx Unconditional branch
- 7xx Branch on Zero
- 8xx Branch on Positive
- 901 Get
- 902 Put
30ExerciseSum Numbers Until 0 Input
- Take 3 minutes to write out a flowchart for a
program that adds all the numbers on the conveyor
belt until the belt value is 0. - The answer is on the next slide, but PLEASE
dont look! - If youre not ready to make a flowchart, just
write out the steps that you can think of. - For example, we know that the program must get
the numbers off the belt. - What else must it do?
- In what order must it do these tasks?
31Sum Numbers Until 0 Input
See Addall.lmc
Load 0
Save in SUM
0. 509 Load zero from 09 1. 367 Store in 67
(SUM) 2. 901 Get number 3. 707 Done if 0 4.
167 Add from 67 (SUM) 5. 367 Store result in
SUM 6. 602 Repeat 7. 567 Load from SUM 8.
902 Put 9. 000 STOP
Get
Y
0?
Load SUM
N
Add from SUM
Output SUM
Save in SUM
STOP
32Is This Data or a Program?(Look at Weird.lmc on
your own)
Weird.lmc
- 0. 901
- 1. 302
- 2. 000
- 3. 666
- 4. 565
- 5. 902
- 6. 000
- 7. 566
- 8. 902
- 9. 000
-
- 65.901
- 66.902
- 67.600
- Input 604 or 607
- What happens with other inputs?
- Try 665
33Preview
- Dont forget questions/comments to CourseTools by
8PM tonight - Section tomorrow
- Write a program together
- Very similar to the homework problem!
- LMC Homework due Tuesday
- Download assignment, LMC from CourseTools
- Submit answers to CourseTools
- Next topic
- Representation