Introduction to Computers, Problem Solving, and Programming ...

66 downloads 263 Views 935KB Size Report
Von Neumann architecture basis for today's computers. ◇ VLSI Technology made computers affordable, small and available to the public. ◇ How programming ...
Introduction to Computers, Problem Solving, and Programming Chapter 1

1.1 Overview of Computers t

t t t

Computer - “A device for counting or computing” Dr. John Atanasoff - 1st computer. ENIAC 1946 at U of Penn Dr. John Von Neumann - Princeton – Stored program concept – Memory rather than wires and switches.

t

Computing History 2

Overview of Computers t

t

t

Von Neumann architecture basis for today's computers VLSI Technology made computers affordable, small and available to the public How programming has changed over time

3

1.2 Computer Hardware t

Every computer is organized roughly into six parts – CPU - central processing unit • Where decisions are made, computations are performed, and input/output requests are delegated

– Main Memory • Stores information being processed by the CPU

– Secondary Memory • Stores data and programs 4

Computer Hardware – Input devices • Allows people to supply information to computers

– Output devices • Allows people to receive information from computers

– Network connection • Modems / Ethernet interface

5

Computer Components

6

Main Memory l

Address

l

Contents

0 1

1024

-27.2 l

354

l

.005 75.62 7

Main Memory t

Stores – programs – data – results

t

Types – RAM – ROM 8

Secondary Memory & Storage t

Semi permanent data-storage capability – Tape or Disk – Hard disk – CD ROM

t

Secondary memory has much more storage capacity 9

CPU t

“Brains” of the computer – Arithmetic calculations are performed using the Arithmetic/Logical Unit or ALU – Control unit decodes and executes instructions

t

Arithmetic operations are performed using binary number system

10

CPU t

Fundamental building block is a switch – Switches are made from ultrasmall transistors

t

Examples – The Pentium ® processor contains about three million transistors – The Pentium Pro ® has about 5.5 million transistors

11

Input / Output Devices t

Accessories that allow computer to perform specific tasks – Receiving information for processing – Return the results of processing – Store information

t

Common input and output devices – Printer – Keyboard

Joystick Monitor

CD-ROM

12

Computer Networks t

LAN - Local area network – Organizational

t

WAN - Wide area network – Internet

13

World Wide Web t t

Introduced 1989 Developed by CERN – European Laboratory for Particle Physics

t

Web browser – GUI – Netscape – IE 14

1.3 Computer Software t

Application software – Programs designed to perform specific tasks that are transparent to the user

t

System software – Programs that support the execution and development of other programs – Two major types • Operating systems • Translation systems

15

Application Software t

t

Application software is the software that has made using computers indispensable and popular Common application software – – – – –

Word processors Desktop publishing programs Spreadsheets Presentation managers Drawing programs 16

Operating System t t

t

Controls and manages the computing resources Important services that an operating system provides – File system – Commands that allow for manipulation of the file system – Ability to perform input and output on a variety of devices – Management of the running systems Examples – MSDOS ®, Windows ®, Unix ® 17

Programming Languages t

Machine Language – “Native tongue” of the computer – Binary 0s and 1s that specify what to do • 0010 0000 0000 0100 • 1000 0000 0000 0101 • 0011 0000 0000 0110

t

High - Level Languages – Resemble human language (C++, C, Pascal) • cost = price + tax; 18

Programming Languages t

Language Standard – Syntax (grammatical form) (rules) – Portable • programs used without modification

t t t

Source Program Object Program Executable Program 19

1.4 Processing a High-Level Language Program t t t

Set of programs used to develop software A key component of a is a translator Types of translators – Compiler – Linker

t

Examples – g++, Borland C++ ®, Microsoft Visual C++ ® 20

Processing a Program t

Editor used to enter the program – Source program (file.cpp) – UNIX vi text editor

t

Compiler translates the source program – Displays syntax errors (not descriptive)

t

Linker/Loader to combine object file with other object files – Executable program 21

Processing a Program t

Major activities – Editing – Compiling – Linking with pre-compiled files • Object files • Library modules

– Loading and executing – Viewing the behavior of the program 22

Process Cycle

23