Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCI 161: Introduction to Programming

Similar presentations


Presentation on theme: "CSCI 161: Introduction to Programming"— Presentation transcript:

1 CSCI 161: Introduction to Programming
Lecture 2: computer History and Language Basics

2 Computer and Programming Basics
A computer is an electronic device that can perform certain tasks. Hardware architecture: CPU, Memory, IO, Secondary Storage; Software (Computer programs) give instructions to computers to perform the tasks. Computers use binary system, meaning that they essentially only understand 1 and 0. Low Level Programming language High level language: C Language is an example. Programs written in C has to be compiled to machine language so that computer can understand. IDE: CodeBlock

3 A brief History of Computers

4 History of Computers Modern computers result from 2 streams of evolution Mechanization of arithmetic calculating machines (hardware) Concept of stored programs process control (software)

5 Mechanization 1 The abacus Blaise Pascal (1623-1662)
used by the Chinese 3 to 4 thousand years ago Blaise Pascal ( ) Pascal’s Adder 1st mechanized adding machine gears and wheels add and subtract, calculate taxes inaccurate

6 Mechanization 2 Gottfried Wilhelm von Liebniz (1646-1716)
1670’s - Liebniz calculator similar to Pascal’s design add, subtract, multiply, divide more reliable and accurate still inaccurate he also invented calculus

7 Stored Program 1 Joseph Marie Jacquard (1752-1834)
Jacquard’s Loom weaving loom metal punch cards to position threads for the weaving process within the decade, 11,000 used in France may have been 1st case of unemployment caused by automation

8 Stored Program 2 Herman Hollerith (1860-1929)
designed a machine that used electric charges to read info off of punch cards for use in 1890 US census store and process census data on punched cards started his own company in 1896 in 1924 that company became International Business Machines Corporation or IBM

9 Charles Babbage (1792-1871) 1830-71 - Analytical Engine
Difference Engine compute polynomials for math tables abandoned, wasn’t precise Analytical Engine designed but never completed, ahead of its time Mill - arithmetic computations Store - store data and results Operation cards - program instructions Variable cards - select memory location for ops Output - printer or punch cards

10 First Computers 1944 - Mark I John Atanasoff and
ABC John Atanasoff and Clifford Berry (Iowa State) small scale vacum tubes Mark I electromechanical computer Howard Aiken (Harvard U.) first real analytical engine based on relays

11 ENIAC - 1946 Electronic Numerical Integrator and Calculator
Best known as first fully electronic computer 18,000 vacuum tubes 1,500 relays 20 x 40 foot room low reliability, lots of power, air conditioning Grace Hopper debugging it

12 von Neumann Architecture
John von Neumann (Princeton) Developed stored program concept both programs and data stored in same memory Fetch decode cycle Modern computers said to use von Neumann architecture

13 First programmer: Ada Agusta
Daughter of Lord Byron Wrote about analytical engine Designed several programs for it Known as the first programmer 1970’s Dept. of Defence named its programming language Ada

14 Computer Generations 1st Generation - before 1960
vacuum tubes and relays ENIAC 2nd Generation transistors IBM 7090 3rd Generation integrated circuits or chips IBM 360 4th Generation - after 1980 large-scale integration - microprocessors

15 Review Questions What two streams do modern computer evolve from?
The name of the first fully electronic computer What architecture do modern computers use?

16 Programming

17 High Level Languages 1842 - Ada Agusta - analytical engine
John Backus - FORTRAN 1958, 60, 64 - ALGOL, COBOL, BASIC US Dept. of Defence - Ada Nicklaus Wirth - Pascal Dennis Ritchie - C Nicklaus Wirth - Modula-2 ANSI C adopted Java, Python ….

18 Software Development Early computers - complex coding schemes
machine language - 0’s and 1’s Later on - introduction of system software assembly language - mnemonics for operations assembly program  assembler  machine lang Even later - compilers created high-level languages (HLL) - natural language HLL program  compiler  machine language

19

20 HLL to Machine Language
Enter HLL program into file using editor program.cpp - source file Translate source code to machine code program.obj - object file Combine object code with libraries program.exe - executable file

21 IDE Integrated Development Environment Note
combines editor, compiler, linker, loader usually includes tools to assist in debugging Note IDE’s usually do not write to disk automatically must remember to save work to disk often, especially before executing a program

22 First Program //library inclusion //function “main” //display string
#include <iostream> using namespace std; int main() { cout << ”Hello world.”; return 0; } //library inclusion //function “main” //display string

23 Programming Errors Vocabulary and grammar - syntax
Rules determine if statement legally constructed - syntax rules Compiler checks rules - gives syntax errors Programs also contain errors in logic - bugs Debugging - finding & fixing logic errors

24 A program to output the sum of two numbers


Download ppt "CSCI 161: Introduction to Programming"

Similar presentations


Ads by Google