6 September How Computers Work. Follow Ups VeriSign: 2001: A Space.
-
Upload
clifton-caldwell -
Category
Documents
-
view
215 -
download
0
Transcript of 6 September How Computers Work. Follow Ups VeriSign: 2001: A Space.
6 September
How Computers Work
Follow Ups VeriSign:
https://lv0.net/Form/TechnoServe/YouCanHelp
2001: A Space Odyssey Produced in 1968 as science fiction
Intel founded Sony introduces Trinitron technology Keyboard, mouse & windows demonstrated First “artificial intelligence” program Apollo Guidance Computer Tentacle Arm
Computer in the Arts About the work
When was the work written or produced? What’s the genre?
The role of computers A character or a tool? Central to the plot or peripheral?
How computers are portrayed Intelligent or simplistic? Threatening, helpful or neutral?
Current Event: Hurricane Images Google Earth: gives people a view of the world "I am trying to get a current overlay for the area
around 2203 Curcor Court in Gulfport, Miss." grass-roots effort
identified scores of post-hurricane images from NOAA determined landmarks to integrate into Google Earth posted them
By Saturday, Google, NASA, CMU formalized Power of the Internet: everyone can contribute This is a great use of Google Earth
Are there bad ones? NY Times, Sept 5http://www.nytimes.com/2005/09/05/technology/05google.html?th&emc=th
To Understand …
How your web page works How does a computer work? How do web pages work?
How you share your web page What is a network? What is the Internet?
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, Al-Khawarizmi 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 0The answer is –number
ElseThe answer is number
Exercise
Break into 3 groups Devise an algorithm to order a
group of people from shortest to tallest
We will then execute it on another group
Homework Assignment A triangle is a 3-sided figure. The sum of
any 2 sides must be longer than the third side.
Write an algorithm to check if three numbers could constitute the sides of a triangle. It produces a result of “yes” or “no”.
(This is also a dry run to make sure that blackboard is working properly.)
Simplified Model of a Computer
processor
instructions data
the information that it works
on
defines an
algorithm
retrieves the instruction directs data movement
Data A computer doesn’t work on actual
numbers, but locations (called variables ) Does action to whatever value is in that
location Variables that have values that never change
are constants
Demonstration How would you swap two numbers? Why do computers work like this?
Data Types
All data is stored as a series of zeroes and ones
Computer doesn’t know if it is numeric or text or what format it is
Computer assumes that the instructions know the format of the data
Programming Languages Ways to describe algorithms Lots of ways to describe, but a machine
has only one way to execute A program translates the language the
person writes into something the computer understands Compilers translate once, interpreters
translate every time Later in the semester we’ll look at what
the computer understands
Web Pages Web pages are defined in a
language called HTML (HyperText Markup Language)
Hypertext: text that has different paths that can be taken
Markup Language: the text that is to be presented and instructions (markups) on how to present it
Hypertext Proposed by Vannevar Bush in 1945 We do not think or learn linearly
We need to understand many concepts and how they come together
People have different knowledge and learning skills
We want to go off and further explore ideas In literature, we may want to explore
alternative outcomes
Markup Language
Source does not appear the way that it will eventually look Contrast: WYSIWYG -- What You See
Is What You Get Advantage: easy to edit Disadvantage: hard to visualize
Editting HTML files Two options
Edit HTML Use a WYSIWYG
Why learn HTML? Tool to understand computers
Why use HTML? Control Simple changes