Computer Science 1 Week 12. This Week... QBasic For Loops QBasic For Loops Computer History Computer History  1 st – 3 rd Generation computers Website.

Slides:



Advertisements
Similar presentations
Introduction to Computers 2010 Class: ________________ Name: ________________.
Advertisements

By : Catherine 7th period. The first computer was made by Germany’s Konrad Zuse in his living room around the first digital computer was made.
History of Computers.
11 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall.
History of the Micro-Computer. Group Question Get into a pair of two. You have three minutes to come up with two answers and make an educated guess at.
History of the Internet By: Rebecca - 5 th Period PIT Class.
CSCI-235 Micro-Computers in Science Course Information & Introduction.
Chapter 2 Data Manipulation. Before we start About the Lab Project. –BASIC Programming: Requirement file on the web site. Due date is posted. Save your.
Computer History Presented by Frank H. Osborne, Ph. D. © 2005 Bio 2900 Computer Applications in Biology.
Appendix The Continuing Story of the Computer Age.
Lecture 2 Computer development history. Topic History of computer development Computer generation Programming language.
Computers What is it? History, Moore’s Law How to build your own? Sohaib Ahmad Khan CS101 - Topical Lecture
Some of these slides are based on material from the ACM Computing Curricula 2005.
History of Computers & the Internet Emily 5th. Creation of Computers Invented in 1936 Konrad Zuse Z1-First freely programmable computer.
History of Computers Computer Technology Introduction.
KEYBOARD – an input device used to type data.
Evolution of Computers
R.D.D. HIGH SCHOOL, BONAIGARH
1 Physical Limits Chip Charles Babbage (1791–1871) The Difference Engine, 1823 –Special purpose device intended for the production of tables. –Made prototypes.
© Prentice-Hall, Inc Definition  Computer - An electronic device that has the ability to store, retrieve, and process data and can be programmed with.
BACS 287 Basics of Programming BACS 287.
History of Computers Abacus – 1100 BC
The four generations of digital Computer
Computer Hardware and Software Chapter 1. Overview Brief History of Computers Hardware of a Computer Binary and Hexadecimal Numbers Compiling vs. Interpreting.
The History of Computers
The History of Computers. People have almost always looked for tools to aid in calculation. The human hand was probably the first tool used to help people.
CCSE251 Introduction to Computer Organization
History of computer and internet Alan.. 7 th period.
THE HISTORY OF COMPUTERS Presenter: Miss T. Johnson Grade:8.
CSCI-235 Micro-Computer in Science Introduction. Course Overview  Class webpage
© Prentice-Hall, Inc Definition  Computer - An electronic device that has the ability to store, retrieve, and process data and can be programmed with.
ITGS Chapter 1: Computer history and basics. Slide 1.
1.1 The Computer Revolution. Computer Revolution Early calculating machines Mechanical devices used to add and subtract By Babylonian (Iraq) 5000 years.
Microprocessor Fundamentals Week 1 Mount Druitt College of TAFE Dept. Electrical Engineering 2008.
1 History of Computers (Excerpts from CMPE3). 2 The History of Computers The history of computers is interesting (or should be if you are in this class)
CMSC 120: Visualizing Information 1/29/08 Introduction to Computing.
CSCI 161 Class 1 Martin van Bommel.
COMP 268 Computer Organization and Assembly Language A Brief History of Computing Architecture.
Basic History of Computing. Al-Khwarizmi written in 830, Hisab al-jabr w’al- muqabalathe al- jabr; in the title we get algebra developed the concept.
History of Computers Computer Technology Day 2. Computer Generations: Overview GenerationTimePrincipal Technology Examples ZerothLate 1800’s to 1940Electro.
The History of Computers What is a computer? A computer is an electronic machine that accepts information (Data), processes it according.
Chapter 1 Introduction.

Computer History By: Taylor Northern. Intro. Do you know a lot about computers or the history of it? Do you know a lot about computers or the history.
History of the Computer and Internet!
Computer History How did we get here?.
History of The Computer and The Internet Jessie :D.
Why build a computer? u Computers were developed to mechanize mathematical computations. u Two definitions:  A computer is “a programmable electronic.
Computers in Education Past, Present, and Future
Who invented the computer?
History of Computers March 26, 2012Greer Potadle.
Session One: An Introduction to Computing History of Computers
A BRIEF HISTORY OF COMPUTERS, THE INTERNET AND THE UNIVERSE By L. Gillett Webmaster MMC.
The four generations of digital Computer 1. The first generation computers 2. The second generation computers 3. The third generation computers 4. The.
Courtney Nielsen  Help us find info  Storage  Performs calculations  Runs software  communication  Storing data  Research  Fact checking  Communication.
Evolution of the Computer. Zeroth Generation- Mechanical 1.Blaise Pascal –Mechanical calculator only perform Von Leibiniz –Mechanical.
You may need to know this for a test????. What is a computer "Computer" was originally a job title: it was used to describe those human beings (predominantly.
History of Computers Past and Present.
Computer A Computer may be defined as an electronic device that operates upon data. So, a computer can store, process and retrieve data as and when desired.
1.3 First Generation Computers 1.4 The Stored Program Computer Group 2.
The First Computers Jacquard’s Loom: programmed a loom
Introduction to Computers
CSCI 161: Introduction to Programming
History of computer science
History Computers.
Computer Applications
History of Computer Science
History of Computers - Long, Long Ago
CSCI-100 Introduction to Computing
Presentation transcript:

Computer Science 1 Week 12

This Week... QBasic For Loops QBasic For Loops Computer History Computer History  1 st – 3 rd Generation computers Website Project is Due! Website Project is Due!

QBasic For Loops Looping a variable through a range

For Statement Loops a block of statements Loops a block of statements  the block is executed numerous times  this allows you to create repetition When do you use it? When do you use it?  execute a block a number of times  process data using the set of numbers Very versatile in QBasic Lite Very versatile in QBasic Lite

For Statement Uses a numeric variable Uses a numeric variable  starts with an initial value  changes its value for each loop  stops once its value is greater than end value Semantics... Semantics...  assigns the initial/next value to the variable  executes the block if the variable is not greater than the end value  repeats the process Default: increment by one (+ 1) in each loop automatically

FOR variable = start TO end Statements NEXT Basic For Statement Syntax

FOR x = 1 to 5 PRINT x NEXT Simple Loop Example

Simple Loop Example Output

FOR x = 1 to 5 PRINT x, x ^ 2 NEXT Simple Loop 2 Example

Simple Loop 2 Example Output

FOR x = -5 to -1 PRINT x, x ^ 2 NEXT Negative Values Example

Negative Values Example Output

FOR Quiz = 1 to 3 INPUT "Score: ", Score LET Sum = Sum + Score NEXT PRINT "Average is"; Sum / 3 Average Example

Score: 97 Score: 72 Score: 83 Average is 84 Average Example Output

Inner Loops Like all QBasic blocks, you can put loops within loops Like all QBasic blocks, you can put loops within loops The loop in the inner-most block is an inner loop The loop in the inner-most block is an inner loop The loop in the outer-most block is an outer loop The loop in the outer-most block is an outer loop

FOR x = 10 to 11 PRINT "Outer: "; x FOR y = 1 to 2 PRINT " Inner: "; y NEXT Inner Loop Example

Outer: 10 Inner: 1 Inner: 2 Outer: 11 Inner: 1 Inner: 2 Inner Loop Example Output

FOR x = 5 to 1 PRINT x NEXT Not-So-Simple Loop Example Negative Range

Not-So-Simple Loop Example Output Nothing!

Not-So-Simple Loop Why? The For... Next Statement The For... Next Statement  starts at the first value  continues until the value of the variable is greater than the end value If the start value is greater than the end value, the loop never executes If the start value is greater than the end value, the loop never executes

The Step Clause Normally, the For... Next Statement increments using +1 Normally, the For... Next Statement increments using +1 The Step Clause allows you to change the increment value The Step Clause allows you to change the increment value This allows you to: This allows you to:  create negative loops  create loops that jump by a specific value

FOR var = start TO end STEP inc Statements NEXT Full For... Next Statement Syntax The increment is defined by the step here

FOR x = 1 TO 10 STEP 2 PRINT x NEXT Large Step Example The increment for variable x in each loop is 2 here

Large Step Example Output

FOR x = 5 TO 1 STEP -1 PRINT x, x ^ 2 NEXT Negative Step Example The increment for variable x in each loop is  1 here

Negative Step Example Output

FOR x = 1 TO 5 STEP 0 PRINT x, x ^ 2 NEXT Zero Step Example

RUNTIME ERROR: Line 1 : Step value is zero Zero Step Example Output

While Loop vs. For Loop For Loop is a form of the While Loop For Loop is a form of the While Loop As a result: As a result:  a While Loop can implement any For Loop  the For Loop is used as a shortcut notation

x = 1 DO WHILE x <= 5 PRINT x LET x = x + 1 LOOP While Loop vs. For Loop FOR x = 1 TO 5 PRINT x NEXT

While Loop vs. For Loop Output

QBasic Lab For Loops – 99 Bottles of Something

Lab: 99 Bottles of Something Overview: Overview:  You will use QBasic to print the 99 Bottles of Beer (Water) Song  Use another drink, water or juice Objectives: Objectives:  Use a For Statement to print the song  Use an If Statement inside the loop

Remember... Turn your program & your output Turn your program & your output  to Lab10 in SacCT You must do your own work You must do your own work If you do not turn in your program, you will not get credit! If you do not turn in your program, you will not get credit!

The First Computer Computer History

Punched Cards Invented by Joseph-Marie Jacquard Invented by Joseph-Marie Jacquard Textile industry Textile industry  control the flow of yarn in a loom  used to create patterns Adapted to Adapted to  automatic pianos  computer data

Charles Babbage Known as the “Father of Computers” Known as the “Father of Computers” Created several calculators Created several calculators Developed the first computer Developed the first computer

The Difference Engine In the 1800’s In the 1800’s  log and trig tables were calculated manually  Babbage knew machines could compute these He designed the Difference Engine He designed the Difference Engine  could compute logarithmic and trigonometric data  first machine to be automatic in action  it was not finished in his lifetime

The Difference Engine: continued It was completed in March 2008 at the Science Museum, London 150 years after its original design, and is faithful to Babbage’s original design ( ). It was completed in March 2008 at the Science Museum, London 150 years after its original design, and is faithful to Babbage’s original design ( ). It is one of only two Babbage engines consisting of 8,000 parts in bronze, cast iron and steel. It is one of only two Babbage engines consisting of 8,000 parts in bronze, cast iron and steel. It weighs five tons and measures 11 feet long and 7 feet tall. It weighs five tons and measures 11 feet long and 7 feet tall.

Computer History Museum, San Jose (June, 2012)

The Analytical Engine A general-purpose calculating machine A general-purpose calculating machine He began work in 1834 He began work in 1834  he never finished it  it has never been built If built, it would have been one of the Wonders of the World If built, it would have been one of the Wonders of the World

The Analytical Engine Use punched cards to run calculations Use punched cards to run calculations Had all the attributes of a modern computer Had all the attributes of a modern computer  Programs – looping, branching – "Barrels"  Memory – "The Store"  Arithmetic Logic Unit – "The Mill"  Bus – "The Rack"

The Store The Rack The Mill Barrels

Ada Lovelace Mathematician Mathematician Spoke several languages Spoke several languages University of Turin lecturer University of Turin lecturer  During a nine-month period in 1842–43, Lovelace translated Italian mathematician Luigi Menabrea's memoir (to English) on Babbage's Analytical Engine. With the article, she appended a set of notes that included a method for calculating a sequence of Bernoulli numbers with the Engine.  Her method is recognized as the world’s first computer program.

Ada Lovelace She made extensive notes She made extensive notes  several volumes, in fact  designed several programs  this included how to calculate Bernoulli numbers World's first programmer World's first programmer

The 1890 Census Crisis Computer History

Census Crisis The United States Federal Constitution The United States Federal Constitution  population must be calculated - census  this must be done every 10 years  used in the House of Representatives However, the U.S. population However, the U.S. population  had grown extremely large  the people could not be counted in 10 years

Herman Hollerith Developed: Developed:  first automatic card-feed mechanism  enhanced card reading  the first key punch – 200 to 300 cards per hour Used electricity Used electricity

Herman Hollerith His system His system  was used for 1890 census  only took 9 months! Hollerith founded Hollerith founded  Tabulating Machine Company  it later became International Business Machines

Birth of Computer Science Computer History

Alan Turing Mathematician, logician & cryptographer Mathematician, logician & cryptographer "Father of Computer Science" "Father of Computer Science"  Highest award in Computer Science is the Turing Award  Developed Turing Machines

Alan Turing's Major Works Developed Turing Machines Developed Turing Machines  invented in 1937  logical model – not an actual computer  proved programming Turing Test Turing Test  artificial Intelligence  no computer has yet passed it

Computer Generations Computers are historically classified by their generation Computers are historically classified by their generation Each generation... Each generation...  marks a new, major, technology  changes how computers are built and/or used  their are currently four generations

1 st Generation Computers Computer History

First Generation Computers 1946 to to 1958 Used the vacuum tube Used the vacuum tube  they consumed a lot of power  they also tended to burn out quickly Programs written in machine language Programs written in machine language Data Data  read with Punched Cards  stored with Magnetic Tape

Vacuum Tubes

Atanasoff-Berry Computer First electronic digital computer First electronic digital computer Development Development  John Atanasoff & Clifford Berry  Iowa State University  built from 1937 to 1942 Speed: 60 Hz Speed: 60 Hz

Atanasoff-Berry Computer Features: Features:  binary digits to represent all data  calculations using electronics  memory is separate from CPU Rebuilt in 1997 Rebuilt in 1997  cost of $350,000  it worked!

ENIAC Electronic Numerical Integrator And Computer Electronic Numerical Integrator And Computer Development Development  John Eckert and John W. Mauchly  U.S. Ballistics Research Laboratory  Needed to fight World War II – then Cold War  Compute ballistic firing tables

ENIAC Designed to be Turing Complete Designed to be Turing Complete Operational in February 1946 Operational in February 1946 Features Features  5 KHz (5000 Hz)  programmed by rewiring – pre 1948  based on decimal – not binary  weighed 30 tons,18 feet high, 80 feet long

ENIAC A tube burned out once every 2 days A tube burned out once every 2 days Retired in 1955 Retired in 1955  operational for only 9 years  estimated to have performed more calculations than all of humanity had ever done prior

Grace Hopper Admiral in the U.S. Navy Admiral in the U.S. Navy Worked on several projects Worked on several projects  Mark II Mainframe  COBOL Programming Language  Compilers  Standardized software testing Discovered the first "bug" Discovered the first "bug"

September 9, 1945

UNIVAC Universal Automatic Computer Universal Automatic Computer Released in 1951 Released in 1951 First commercial computer First commercial computer  43 were sold to government and industry  used to tabulate the census

UNIVAC Some features Some features  ran programs on punched cards  secondary storage: metal oxide tape  clock: 2.25 MHz Predicted the 1952 election Predicted the 1952 election  Eisenhower over Stevenson  news agencies held the results - great publicity

IBM RAMAC 305 Random Access Method of Accounting and Control Random Access Method of Accounting and Control Released in 1956 Released in 1956 First computer to use a hard drive First computer to use a hard drive  based on record technology  could store 5 million 7-bit characters

2 nd Generation Computers Computer History

Second Generation Computers 1959 to to 1964 Used Transistors Used Transistors  more reliable than vacuum tubes  required less power Compilers were developed Compilers were developed Disk Storage was developed Disk Storage was developed

DEC PDP-1 Programmed Data Processor-1 Programmed Data Processor-1 Digital Equipment Corporation (DEC) Digital Equipment Corporation (DEC) Released 1960 Released 1960 Features Features  read data from tape  used a cathode ray tube (T.V.) to display data The first hacker computer The first hacker computer World's first digital video game: Space War World's first digital video game: Space War

3 rd Generation Computers Computer History

Third Generation Computers 1965 to to 1970 Used integrated circuits Used integrated circuits  increased speed  smaller size  lower cost  even less electricity Birth of the minicomputer Birth of the minicomputer

IBM 360 Most expensive computer project ever Most expensive computer project ever  the "5 billion dollar gamble"  this is over 30 billion by today's dollars Released 1964 Released 1964 Breakthrough Breakthrough  architecture and implementation are different  microcode technology

IBM 360 It was the first platform computer It was the first platform computer  all 360 computers would be compatible  initial models: 30, 40, 50, 60, 62, and 70  peripherals could be interchanged Huge success Huge success  companies could buy the best model  companies could upgrade their systems later

DEC PDP-8 First successful commercial minicomputer First successful commercial minicomputer  released in 1965  it cost less than $20,000 Features Features  up to 32k of RAM  1 MHz – varied by model  multiple versions available