CPS120: Introduction to Computer Science

34
CPS120: Introduction to Computer Science Introduction to Computers

description

CPS120: Introduction to Computer Science. Introduction to Computers. Introduction to Computers. Objectives Understand the history of computers Understand the components that make up a desktop PC Understand the basics of computer architecture Understand the role of an operating system - PowerPoint PPT Presentation

Transcript of CPS120: Introduction to Computer Science

Page 1: CPS120: Introduction to Computer Science

CPS120: Introduction to Computer Science

Introduction to Computers

Page 2: CPS120: Introduction to Computer Science

Introduction to Computers

Objectives – Understand the history of computers – Understand the components that make up a

desktop PC – Understand the basics of computer architecture – Understand the role of an operating system– Understand the role of assemblers, interpreters,

& compilers

Page 3: CPS120: Introduction to Computer Science

5

A mental model that removes complex details

This is a key concept.

Abstraction

Page 4: CPS120: Introduction to Computer Science

Representing Data

Data can be numeric, alphabetic, or alphanumeric

Computer only uses “on” & “off” within its circuits

Page 5: CPS120: Introduction to Computer Science

Representing Data: Bits

Computer only uses “on” & “off” within its circuits

Binary number system – “On”, 1, high state of electricity – “Off”, 0, low state of electricity – Bits (0’s and 1’s)

Page 6: CPS120: Introduction to Computer Science

Representing Data: Bytes

Byte = 8 bits (23) 256 possible combinations of 8 bits Decimal system is cumbersome & awkward

for pc’s – Can convert from decimal to binary & vice

versa • ASCII (American standard code for information

interchange)

128 characters in the 7-bit set

Page 7: CPS120: Introduction to Computer Science

3

Hardware: The physical elements of a computing system (printer, circuit boards, wires, keyboard…)

Software: The programs that provide the instructions for a computer to execute

Computing Systems

Page 8: CPS120: Introduction to Computer Science

4

Communication

Application

Operating System

Programming

Hardware

Data

Layers of a Computing System

Page 9: CPS120: Introduction to Computer Science

Early History of Computers

Abacus Pascal’s gear-driven counting machine (mid

17th Century)– His father was a tax collector

Babbage designed a programmable computer (1834)

Joseph Jacquard designed a loom that used the the punched card to store instructions (late 18th Century)

Page 10: CPS120: Introduction to Computer Science

7

Ada Augusta, Countess of LovelaceFirst Programmer, the loop (mid 19th Century)

Alan Turing (1936)Turing Machine, Artificial Intelligence Testing

Harvard Mark I, ENIAC, UNIVAC IEarly computers launch new era in mathematics, physics, engineering and economics

Early History of Computing

Page 11: CPS120: Introduction to Computer Science

"Modern" Developments Hollerith built machine for US census bureau

& founded IBM (late 19th Century) 1946, ENIAC used vacuum tubes (Univ of

Penn) - very hot, needed AC, military paid for this research

Transistors used in 1950’s, didn’t burn out like vacuum tubes

Integrated circuits (chips) used in 1960’s Microprocessor used in 1970’s Supercomputers, mainframes, minicomputers,

workstations, desktop computers

Page 12: CPS120: Introduction to Computer Science

8

Vacuum TubesLarge, not very reliable, generated a lot of heat

Magnetic Drum Memory device that rotated under a read/write head

Card Readers Magnetic Tape DrivesDevelopment of these sequential auxiliary storage devices

First Generation Hardware (1951-1959)

Page 13: CPS120: Introduction to Computer Science

9

TransistorReplaced vacuum tube, fast, small, durable, cheap

Magnetic CoresReplaced magnetic drums, information available instantly

Magnetic DisksReplaced magnetic tape, data can be accessed directly

Second Generation Hardware (1959-1965)

Page 14: CPS120: Introduction to Computer Science

10

Integrated CircuitsReplaced circuit boards, smaller, cheaper, faster, more reliable.

TransistorsNow used for memory construction

Terminal An input/output device with a keyboard and screen

Third Generation Hardware (1965-1971)

Page 15: CPS120: Introduction to Computer Science

11

Large-scale IntegrationGreat advances in chip technology

PCs, the Commercial Market, WorkstationsPersonal Computers were developed as new companies like Apple and Atari came into being. Workstations emerged.

Fourth Generation Hardware (1971-?)

Page 16: CPS120: Introduction to Computer Science

12

•Parallel Computing•Computers rely on interconnected central processing units that increase processing speed.

•Networking•With the Ethernet small computers could be connected and share resources. A file server connected PCs in the late 1980s.

•ARPANET and LANs Internet•A network of interconnected networks

Parallel Computing and Networking

Page 17: CPS120: Introduction to Computer Science

13

Machine LanguageComputer programs were written in binary (1s and 0s)

Assembly Languages and translatorsPrograms were written in artificial programming languages and were then translated into machine language

Programmer ChangesProgrammers divide into application programmers and systems programmers

First Generation Software (1951-1959)

Page 18: CPS120: Introduction to Computer Science

Representing Instructions:

Low Level Languages– Each computer uses its own machine

language – Assembly is a low-level language close to

machine language • Assembly languages are different on each

computer

• An assembler converts a program into machine language

Page 19: CPS120: Introduction to Computer Science

Machine Languages

different for each computer processor

0100

001101 100000 001101 110001

00101 10001 10000

01110

111001

. . .

Page 20: CPS120: Introduction to Computer Science

Assembly Languages different for each computer processor

main proc paymov ax, dsegmov ax, 0b00hadd ax, dxmov a1, b1mul b1, axmov b1, 04h

Page 21: CPS120: Introduction to Computer Science

14

High Level LanguagesUse English-like statements and made programming easier: Fortran, COBOL, Lisp (artifical intelligence).

High-LevelLanguages

Assembly LanguageMachine

Language

Second Generation Software (1959-1965)

Page 22: CPS120: Introduction to Computer Science

16

Application Package

Systems Software

High-Level Languages

Assembly Language

Machine Language

Third Generation Software (1965-1971)

Page 23: CPS120: Introduction to Computer Science

15

Third Generation Software (1965-1971) Systems Software

– utility programs, – language translators, – and the operating system, which decides which

programs – to run and when.

Separation between Users and Hardware Computer programmers now created programs to

be used by people who did not know how to program

Page 24: CPS120: Introduction to Computer Science

17

Structured ProgrammingBASIC refined, Pascal, C, C++

New Application Software for UsersSpreadsheets, word processors, database management systems

Fourth Generation Software (1971-1989)

Page 25: CPS120: Introduction to Computer Science

18

MicrosoftThe Windows operating system, and other Microsoft application programs dominate the market

Object-Oriented DesignBased on a hierarchy of data objects (i.e. Java)

World Wide WebAllows easy global communication through the Internet

New UsersToday’s user needs no computer knowledge

Fifth Generation Software (1990- present)

Page 26: CPS120: Introduction to Computer Science

20

Programmer / User

Applications Programmer(uses tools)

User with No Computer Background

Systems Programmer(builds tools)

Domain-Specific Programs

Computing as a Tool

Page 27: CPS120: Introduction to Computer Science

21

Computing as a Discipline

Four Necessary Skills1. Algorithmic Thinking

2. Representation

3. Programming

4. Design

Page 28: CPS120: Introduction to Computer Science

System Components

Hardware – I/O devices (input/output)

• keyboard, mouse, monitor, etc.

– CPU– Primary Storage– Secondary Storage

Software

Page 29: CPS120: Introduction to Computer Science

Computer Architecture

Microprocessor (examples Pentium, Pentium II, PowerPC, etc.) – includes Bus Interface Unit, Arithmetic & Logic Unit

(ALU), Control Unit, registers – motherboard is simply the main circuit board that

contains most of these parts – the CPU (central processing unit) is considered to be

most of these parts taken as a whole Bus

– connects the microprocessor to the RAM & ROM – addresses for data and instructions are important

Page 30: CPS120: Introduction to Computer Science

Storage Devices Primary storage

– RAM (Random Access Memory, or just “memory” for short)

• active data that is being stored, lost if power is cut off so save often

– ROM (Read-Only Memory) • commands that are permanently stored on chips • PC’s use BIOS, Macs use the Toolbox

Secondary storage – Hard disk, floppy disks – Slower method of storage & retrieval but “safer”

Page 31: CPS120: Introduction to Computer Science

Software: Systems Software

Operating systems– Controls the hardware components (disks,

CPU, printers, etc.) – Windows XP, Windows NT/2000, Windows 9-

X, MS-DOS, OS/2, MacOS, Unix, Linux, BeOS

Page 32: CPS120: Introduction to Computer Science

Software: Application Software

Office products– Word processors– Spread sheets– Presentation software– Email

Business applications– General ledger– Financials

• Accounts payable• Accounts receivable

– HRMS– Fixed assets/inventory

Page 33: CPS120: Introduction to Computer Science

Programming Software

Text Editor– Used by the programmer while coding the

program in a programming language• Like a word processor - creates a text file containing

the program's instructions or "source code" – Examples are “nled” and “vi” editors in Unix systems

– Other editors are NotePad and WordPad which are text-based

Page 34: CPS120: Introduction to Computer Science

Programming Software

Interpreters – Translates source code into machine code line by line

Compiler – Translates source code into an object file, than uses

linker to create an executable file • A source module (source code) becomes an "object" module

(compiled module)

• Then it is linked with system modules to become a "load" module (linked module)

It is usually more efficient to use a compiler