Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.

Slides:



Advertisements
Similar presentations
Laboratorio di Calcolo II Obbiettivo: insegnarvi a scrivere programmi in c++ 2 ore/settimana di lezione in aula 4 ore/settimana di esercitazioni personali.
Advertisements

4/23/2015Engineering Problem Solving with C++ second edition, J. ingber 1 Engineering Problem Solving with C++, Etter/Ingber Chapter 1.
Introduction to Computer Programming Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Lecture 1: Overview of Computers & Programming
Computer Programming Belaid Moa Phone: Office : ECS 115 Spring 2008.
Chapter Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing Describe.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
Chapter 01 Introduction Chapter 0 Introduction. Chapter 02 History of Computing - Early Computers Abacus (ancient orient, still in use) Slide rule (17C,
Introduction Extended and Concise Prelude to Programming Concepts and Design Copyright © 2003 Scott/Jones, Inc.. All rights reserved. 1 Introduction.
Beginning Snapshots Chapter 0..
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
1 The development of modern computer systems Early electronic computers Mainframes Time sharing Microcomputers Networked computing.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
1 Chapter 1 The Big Picture. 2 2 Computing systems are dynamic entities used to solve problems and interact with their environment. They consist of devices,
Hardware and Software Basics. Computer Hardware  Central Processing Unit - also called “The Chip”, a CPU, a processor, or a microprocessor  Memory (RAM)
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
1 6 Abacus An early device to record numeric values Blaise Pascal Mechanical device to add, subtract, divide & multiply Joseph Jacquard Jacquard’s Loom,
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
Chapter 01 Nell Dale & John Lewis.
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to Programming Dr Masitah Ghazali Programming Techniques I SCJ1013.
About the Presentations The presentations cover the objectives found in the opening of each chapter All chapter objectives are listed in the beginning.
Course Introduction C++ An Introduction to Computing.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Computer Organization Hardware and Software. Computing Systems Computers have two kinds of components: Hardware, consisting of its physical devices (CPU,
INTRODUCTION TO COMPUTING
What is a Computer ? Computers are Electronic Machines that process (performs calculation and manipulation) Data under the control of Set of Instructions.
Laboratorio di Calcolo I Docente: prof. Berardi (Dip. Informatica) Lezione introduttiva su Computing ed esercitazioni di Unix/Linux tenute da Fabrizio.
Welcome to Computing Presentation slides modified by M. A. Papalaskari from “Java Software Solutions Foundations of Program Design (3 rd ed.)” by John.
Introduction Chapter 1. 1 History of Computers Development of computers began with many early inventions: The abacus helped early societies perform computations.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
Chapter 0 Introduction Yonsei University 1 st Semester, 2012 Sanghyun Park.
Chapter 1 The Big Picture.
Computer Parts. Two Basic Parts Hardware & Software.
CMSC 120: Visualizing Information 1/29/08 Introduction to Computing.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
CPS120: Introduction to Computer Science Introduction to Computers.
Visual C++ Programming: Concepts and Projects
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Chapter 1 Introduction.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Module 2 : Part 1 INTRODUCTION TO HARDWARE & SOFTWARE INTRODUCTION TO HARDWARE & SOFTWARE.
Chapter 1 The Big Picture Chapter Goals Describe the layers of a computer system Describe the concept of abstraction and its relationship to computing.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Beginning Snapshots Chapter 0. C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Chapter 1 An Overview of Computers and Programming Languages.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Introduction to Computers
An Overview of the Computer System
Chapter 1: An Overview of Computers and Programming Languages
Chapter 1 The Big Picture
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Computer Organization
Computer System and Programming
About the Presentations
Chapter 1: An Overview of Computers and Programming Languages
UNIV 103 CS Majors Seminar Dr. Blaise W. Liffick Fall 2017.
Introduction to Computers and the internet
Looking Inside the machine (Types of hardware, CPU, Memory)
An Overview of the Computer System
Computer Science I CSC 135.
Chapter 3 Hardware and software 1.
Chapter 3 Hardware and software 1.
History of Computers - Long, Long Ago
Presentation transcript:

Beginning Snapshots Chapter 0

C++ An Introduction to Computing, 3rd ed. 2 Objectives Give an overview of computer science Show its breadth Provide context for computer science concepts Events from the past Describe basic components, organization of a computer

C++ An Introduction to Computing, 3rd ed. 3 Areas of Computer Science Algorithms and Data Structures Architecture Artificial Intelligence and Robotics Database and Information Retrieval Human-Computer Communication Numerical and Symbolic Computation Operating Systems Programming Languages Software Methodology and Engineering Social and Professional Context

C++ An Introduction to Computing, 3rd ed. 4 Important Concepts in Computer History The mechanism of arithmetic The stored program The graphical user interface The computer network

C++ An Introduction to Computing, 3rd ed. 5 Machines to Do Arithmetic Early calculators Abacus3000 B.C. Stonehenge1900 – 1600 B.C Al-Khowarizm12 th Century Napier's bones1612 Slide rule1630 Pascaline1642 Leibniz' calculator1673

C++ An Introduction to Computing, 3rd ed. 6 The Stored Program Jacquard loom1801 Mechanical Computers Babbage's Difference Engine1822 Babbage's Analytical Engine1833 Ada Augusta1842

C++ An Introduction to Computing, 3rd ed. 7 Electromechanical Computers Hollerith's tabulating machine1890 Konrad Zuse Alan Turing1937 The Mark I1944 Atanasoff's Electronic Digital Computer (ABC) Grace Hopper1944

C++ An Introduction to Computing, 3rd ed. 8 First-Generation Computers Vacuum tube computers ENIAC John Von Neumann's "First Draft of a Report on the EDVAC"1945 First bug in a computer1945 UNIVAC1951

C++ An Introduction to Computing, 3rd ed. 9 Second Generation Computers Used transistors FORTRAN1957 IBM LISP COBOL1960 ALGOL 60

C++ An Introduction to Computing, 3rd ed. 10 Third-Generation Computers Chips and Integrated Circuits The IBM System/ The PDP Douglas Englebart: the mouse, Two-D display, editing, hypermedia,1968 Pascal Ken Thompson: UNIX1969 ARPANET – The beginning of the Internet

C++ An Introduction to Computing, 3rd ed. 11 Fourth-Generation Computers Intel 4004 Chip1971 Dennis Richie: C1973 Ethernet Court rules Atanasoff was legal inventor of first electronic digital computer Altair, BASIC, Apple Apple II, Cray 1, Apple Corp. Microsoft Corp.1976 IBM PC1981

C++ An Introduction to Computing, 3rd ed. 12 Fourth-Generation Computers Bjarne Stroustrup: C Novell announces Netware TCP/IP Macintosh1984 Windows1985 Intel 386 Chip1986 Tim Berners—Lee: WWW1991 Linux1992

C++ An Introduction to Computing, 3rd ed. 13 Fourth-Generation Computers Pentium chips, Power PC chip1993 MOSAIC, Apple Newton Netscape Navigator 1.0, Yahoo!1994 Palm computing James Gosling: JAVA1995 Windows 95, Internet Explorer, Internet goes commercial Windows 98, Apple's IMAC1998 Microsoft's court case

C++ An Introduction to Computing, 3rd ed. 14 Fourth-Generation Computers Y2K Problem, Powermac G41999 Windows GHZ processors Mac OS X2001 Windows XP Quantum Computer2002

C++ An Introduction to Computing, 3rd ed. 15 Graphical User Interface Command line interface required precise and cryptic commands Xerox PARK had developed GUI prototype in 1972 Steve Jobs saw it several years later and used new hardware capabilities to implement GUI makes computer easy to use

C++ An Introduction to Computing, 3rd ed. 16 Network Defn: Two or more computers connect to exchange resources Processing power Storage Access to a printer Software resources Messages

C++ An Introduction to Computing, 3rd ed. 17 Network Time sharing in early 1960s Users communicate with host computer ARPANET connected research center computers in 1969 Eventually developed into Internet Local Area Network hardware and operating systems developed late 1970s ISPs now affordable, widely available for even home computers

C++ An Introduction to Computing, 3rd ed. 18 Computing Systems Computers have two kinds of components: Hardware – physical devices such as CPU memory storage devices Software – programs such as Operating system applications utilities

C++ An Introduction to Computing, 3rd ed. 19 Hardware: CPU Central Processing Unit (CPU): the “brain” of the machine Circuitry that performs arithmetic and logical ML statements CPU measurement Speed (roughly) in megahertz (millions of clock-ticks per second) Examples Intel Pentium, AMD K6, Motorola PowerPC, Sun SPARC,

C++ An Introduction to Computing, 3rd ed. 20 Storage Random Access Memory (RAM) “Main” memory, which is fast, but volatile... Analogous to a person’s short-term memory. Many tiny “on-off” switches “on” is represented by 1, “off” by 0. Each switch is called a binary digit, or bit. 8 bits is called a byte bytes =1024 bytes is called a kilobyte (1K) 2 20 bytes is called a megabyte (1M).

C++ An Introduction to Computing, 3rd ed. 21 Storage Secondary Memory (Disk): Stable storage using magnetic or optical media. Analogous to a person’s long-term memory. Slower to access than RAM. Examples: floppy disk (measured in kilobytes) hard disk (measured in gigabytes (2 30 bytes)) CD-ROM (measured in megabytes),...

C++ An Introduction to Computing, 3rd ed. 22 Input and Output Input devices Instructions and data must be encoded in binary form and transmitted to the CPU Examples: keyboard mouse, trackball, joystick scanner audio, video capture boards

C++ An Introduction to Computing, 3rd ed. 23 Input and Output Output devices Convert data from binary to another form Examples monitors, printers sound, video robotics control Communication between CPU and peripheral devices is through ports Ports communicate via the system bus

C++ An Introduction to Computing, 3rd ed. 24 Hardware: the Bus The Bus: Connects CPU to other hardware devices. Analogous to a person’s spinal cord. Speed measured in megahertz Like the CPU Typically much slower than the CPU... The bottleneck in most of today’s PCs.

C++ An Introduction to Computing, 3rd ed. 25 Hardware: Cache Access speed of RAM Faster than accessing secondary memory Still quite slow, relative to the rate at which the CPU runs. Solution: Add a fast cache memory to the CPU Store recently used instructions and data Assumption: These instructions/data were needed recently They will be needed again in the near future.

C++ An Introduction to Computing, 3rd ed. 26 Hardware: Summary Putting the pieces together: CPU Bus Main Memory Secondary Memory cache Program storage Long-term in secondary memory Loaded into main memory to run From which the CPU retrieves and executes their statements.

C++ An Introduction to Computing, 3rd ed. 27 Software: OS Operating system (OS) Loaded from secondary memory into main memory when the computer is turned on, Remains in memory until the computer is turned off. Disk RAMCPU Cache Bus OS

C++ An Introduction to Computing, 3rd ed. 28 Software: OS OS acts as the “manager” of the system, Making sure that each hardware device interacts smoothly with the others. Provides an interface Enables user to interact with the computer, Awaits user input if no application is running. Examples: MacOS, Windows-95, Windows-NT, UNIX, Linux, Solaris,...

C++ An Introduction to Computing, 3rd ed. 29 Software: Applications Applications are non-OS programs Perform some useful task Including word processors, spreadsheets, databases, web browsers, C++ compilers Example C++ compilers/environments: CodeWarrior (MacOS, Win95, WinNT, Solaris) GNU C++ (UNIX, Linux) Turbo/Borland C++ (Win95, WinNT) Visual C++ (Win95, WinNT)

C++ An Introduction to Computing, 3rd ed. 30 Software: User Programs Programs that are neither OS programs nor applications are called user programs. User programs are what you’ll be writing in this course.

C++ An Introduction to Computing, 3rd ed. 31 What is Programming? Computer Program A sequence of statements that instruct a computer in how to solve a problem. Programming The act of designing, writing and maintaining a program Programmers People who write programs

C++ An Introduction to Computing, 3rd ed. 32 What kinds of statements do computers understand? A computer only understands machine language statements. Characteristics of machine language A sequence of ones and zeros Cause the computer to perform a particular action, such as add, subtract, multiply,...

C++ An Introduction to Computing, 3rd ed. 33 Machine Language (ML) ML statements Stored in a computer’s memory Computer memory is a sequence of switches. an “on” switch is represented by 1, an “off” switch is represented by 0. ML thus appears to be binary (base-2):

C++ An Introduction to Computing, 3rd ed. 34 Early Computers... required a programmer to write in ML... Problem Easy to make mistakes! Such mistakes are hard to find! Not portable -- only runs on one kind of machine! Programming was very difficult!

C++ An Introduction to Computing, 3rd ed. 35 A Bright Idea Devise a set of abbreviations (mnemonics) corresponding to the ML statements Create a program (the assembler) to translate them into ML. ADD 34, R1 MOVER1,1200 CMPRR1, R Assembler Assembly language statements (mnemonics) Machine language statements

C++ An Introduction to Computing, 3rd ed. 36 Advantages and Disadvantages More natural than binary. Much easier to read programs Much easier to find and fix mistakes Still not portable to different machines Each machine had its own set of mnemonics Each had its own assembler

C++ An Introduction to Computing, 3rd ed. 37 High Level Languages Improvement on assembly language Devise a set of statements that are close to human language ( if, while, do,...) Create a program to translate them into ML. The set of statements is called a high level language (HLL) The translation program is called a compiler.

C++ An Introduction to Computing, 3rd ed. 38 Contrast Assembler and HLL Compiler Assembler translates one mnemonic into one ML statement Compiler translates one HL statement into several ML statements z = x + y; Compiler

C++ An Introduction to Computing, 3rd ed. 39 Advantage of HLLs Programs are easier to read Errors are easier to find Programs are portable from one computer to another Assumes the language is standard Just create a new compiler which does the translation into the correct ML

C++ An Introduction to Computing, 3rd ed. 40 Objectives in Programming A program should solve a problem: Correctly Efficiently Readably In user-friendly fashion It actually solves the problem Without wasting time or space Understandable by another person In a way that is easy for its user to use

C++ An Introduction to Computing, 3rd ed. 41 Summary of "Levels" of Computer Languages Low level ML in binary language Medium Level Assembly language High Level as in C++ Hard to read, not portable Mnemonics, easier to read, still not portable Reads like English and algebra, portable

C++ An Introduction to Computing, 3rd ed. 42 Putting It All Together Programs and applications that are not running are stored on disk. App Disk RAMCPU Cache Bus OS

C++ An Introduction to Computing, 3rd ed. 43 Putting It All Together When you launch a program OS controls the CPU Loads the program from disk to RAM. App Disk RAMCPU Cache Bus OS App

C++ An Introduction to Computing, 3rd ed. 44 Putting it all together The OS then relinquishes the CPU to the program, Application program begins to run. App Disk RAMCPU Cache Bus OS App

C++ An Introduction to Computing, 3rd ed. 45 The Fetch-Execute Cycle OS repeatedly fetches the next instruction (from memory / cache), Executes it Stores any results back to memory. That’s all a computer does: fetch-execute- store, millions of times each second! App Disk RAMCPU Cache Bus OS App