How Computers Work

Download Report

Transcript How Computers Work

How Computers Work
Part 1
6 February 2008
What does a Computer Do Well?

Intelligence amplifier




Does repetitive tasks quickly and correctly



amplifies our ability to perform mental activities
“power tools” for the mind
Can process much more information
Check things more quickly
Removes people from boring tasks
Manipulates forms and data
What Wasn’t Possible Before?


We can do things in virtual environments
Chemists can see things at microscopic levels




Micron: millionth of a meter
Model weather
Hurricane predictions
Model historic events
Marvelous Manipulator

Manipulates form, not content



When it appears to understand or apply judgment…




Everything is a symbol
Computers do not understand meaning
Reflecting human knowledge that is encapsulated
Programming: capturing our knowledge
“expert systems”
Examples from movies or books?
What a Computer Does: Transforms
IN

Different reports from the same data
Multiple inputs, one output


Displaying a movie
One input, multiple outputs


OUT
One input, one output


PROCESS
Computing a statistic
Other examples?
Thinking about Tools






Write down a favorite tool or device
Write down what it is intended to do
Write down an alternative use
Switch with a neighbor
Write down another alternative
Switch back
Computers: The Most Adaptable of Tools

Why? We can PROGRAM the computer


Embedded computers


Instructions are called software
Programmed by the manufacturer
General purpose computers

Programmed by the consumer
How Does a Computer Work?




It is actually a very simple machine
It executes exactly what it is told to do
Forrest Gump

“Run, Forrest, run”

Forrest
Computers execute algorithms
What is an algorithm?


A detailed sequence of actions to perform to
accomplish some task
Named after an Iranian mathematician, AlKhawarizmi



813 – 833 C.E.
Mathematician: algebra, trigonometry, geometry
Astronomy and geography as well
Examples of Algorithms

Mapquest directions
Assembly instructions
User’s manual
Software program

Other examples?



A simple algorithm

Using a calculator, how do you find the
average of three numbers?



Assume no average function
Assume that the calculator is already on
Solution
Enter the first number; enter +
Enter the second number; enter +
Enter the third number; enter / 3 =
A bigger example

Using a calculator, how do you find the
average of 100 numbers?



No longer want to list one by one
Introduces loops
Solution
For each number,
Enter the number; enter +
Enter / 100 =
A more complex algorithm



Take the absolute value of a number
Introduces decision making
Solution
If the number is less than 0
The answer is –number
Else
The answer is number
Simplified Model of a Computer
retrieves the
instruction
directs data
movement
defines an
algorithm
Performs the
operations
processor
Control
Unit
Arithmetic
Logic Unit
instructions
data
MEMORY
the
information
that it works
on and
produces