fall, 2006computer strtucture1 computer structure nathan friedman fall, 2006

46
Fall, 2006 Computer Strtucture 1 Computer Structure Nathan Friedman Fall, 2006

Upload: dortha-dawson

Post on 26-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 1

Computer Structure

Nathan FriedmanFall, 2006

Page 2: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 2

A Brief History

The Abacus is considered to be the first mechanical computing device

Page 3: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 3

Mechanical Calculators 1612 – John Napier used floating point

arithmetic and invented the logarithm 1622 – William Oughtred created the

slide rule based on Napier’s logarithms. This was the primary calculator used by engineers until the 1960’s

1642 – Blaise Pascal created a machine that could add and subtract, automatically carrying numbers

1673 – Gottfried Leibnitz built a calculator that could multiply as well

Page 4: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 4

Mechanical Calculators

1612 – John Napier used floating point arithmetic and invented the logarithm

Page 5: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 5

Mechanical Calculators

1612 – John Napier used floating point arithmetic and invented the logarithm

1622 – William Oughtred created the slide rule based on Napier’s logarithms. This was the primary calculator used by engineers until the 1960’s

Page 6: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 6

Mechanical Calculators 1612 – John Napier used floating point

arithmetic and invented the logarithm 1622 – William Oughtred created the

slide rule based on Napier’s logarithms. This was the primary calculator used by engineers until the 1960’s

1642 – Blaise Pascal created a machine that could add and subtract, automatically carrying numbers

Page 7: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 7

The Pascaline -- 1642

Page 8: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 8

Mechanical Calculators 1612 – John Napier used floating point

arithmetic and invented the logarithm 1622 – William Oughtred created the

slide rule based on Napier’s logarithms. This was the primary calculator used by engineers until the 1960’s

1642 – Blaise Pascal created a machine that could add and subtract, automatically carrying numbers

1673 – Gottfried Leibnitz built a calculator that could multiply as well

Page 9: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 9

The Industrial Age

Joseph-Marie Jacquard invented an automatic loom using punched cards to control patterns in the fabrics. (Leading to riots against replacing people by machines.)

Page 10: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 10

Charles Babbage 1822 – Charles Babbage designed

the Difference Engine for comuputing navigational tables

1833 – Designed the Analytical Engine that had the basic components used in a modern computer

1847-1849 – Work on Difference Machine but technology too primitive to build it. In 1991 the Science Museum in London built it

Page 11: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 11

The World’s First Programmer

Ada Augusta King, Countess of Loveless adds notes and documentation on Analytical Engine. She writes first program.

Page 12: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 12

The Difference Engine

Page 13: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 13

Herman Hollerith 1890 Hollerith won

competition for developing data processing equipment for the US Census

Founded Hollerith Tabulating Company that became IBM in 1924

Page 14: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 14

Early Modern Machines

1935-38 Konrad Zuse developed Z-1 and Z-2 computers using binary arithmetic

1936-39 John Vincent Atanasoff and John Berry built ABC computer for solving linear systems in Physics. Introduced ALU and rewriting memory.

Page 15: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 15

Early Modern Machines 1943 Alan Turing built Colossus used to break

German codes encrypted using ENIGMA machine

1944 – Harvard Mark 1 used to compute artillery and navigation tables

Page 16: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 16

The First Computer Bug 1945 Grace

Murray Hopper found bug killed in jaws of electromechanical relay on Mark II computer at Harvard

Page 17: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 17

ENIACThe First Electronic

Computer

1943 Work started on ENIAC at University of Pennsylvania under John Mauchly and J. Presper Eckert with Herman Goldstein

A general purpose computer used for computing artillery tables

Page 18: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 18

ENIAC Used 18,000

vacuum tubes U shaped, 25m

long, 2.5m high, 1m wide

Programmed by plugging cables and setting switches

From 1 hour to 1 day to program

Page 19: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 19

Von Neumann Computer

1944 – John von Neumann joined ENIAC team.

Credited with the idea of storing programs as numbers

1945 – von Neumann proposed a stored program computer called EDVAC

Page 20: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 20

The Late 1940’s 1947 – William Shockley, John

Bardeen, Walter Brattain invent the transistor

1949 – Maurice Wilkes at Cambridge developed EDSAC, the first large scale, fully operational stored program computer

1951 – Remington-Rand sold Univac 1 to US government for $1,000,000

Page 21: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 21

The 1950’s

IBM produces series of compters with Jean Amdahl as chief architiect

Memory upgraded to magnetic core memory, magnetic tapes and disks with movable read/write heads

1957 – Fortran introduced 1958 – Integrated Circuit invented

Page 22: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 22

The 1960’s

1963 – ASCII code introduced 1965 – IBM/360 introduced using

integrated circuits 1965 – DEC introduced PDP-8, first

minicomputer 1969 – Work began on ARPAnet

(the predecessor of the internet)

Page 23: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 23

The Early 1970’s 1971 – Intel 4004 the first

microprocessor and the first floppy disk introduced

1973 – Xerox invents Ethernet 1775 – First PC, MITS Altair 8800 (no

keyboard, no display, no auxilliary storage)

Bill Gates and Paul Allen wrote a BASIC compiler for the Altair, their first product

Page 24: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 24

The Later 1970’s

1976 – Steve Jobs and Steve Wozniak develop Apple I in their parent’s garage

1976 – Cray-1, first supercomputer announced

Page 25: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 25

IBM PC 1981 – IBM enters

market with IBM PC based on Intel 8088 chip

Release of Microsoft DOS for the PC

1982 Computer chosen by Time Magazine as “Man of the Year”

Page 26: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 26

Apple Macintosh 1984 – Macintosh

introduced, based on Xerox Alto. The icon and mouse became the main tools for interacting with computers

Page 27: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 27

Computer Architecture

At the lowest level a computer is just a collection of switches that can be on or off (representing 1 and 0).

The circuitry is organized into components that serve different functions such decoding bit sequences, carrying out simple arithmetic operations, etc.

Page 28: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 28

Von Neumann Machines

Modern computers are called Von Neumann Machines

John Von Neumann is credited with the idea that programs can be encoded and stored in the memory just like data

A control unit transfers instructions from the memory into registers so that a processing unit can execute them

Page 29: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 29

The 5 Classic Components

CPU

Computer

Control

Registers

Memory

InputDevices

OutputDevices

Page 30: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 30

The Intel Pentium ProcessorSchematic Layout

Branch

Control

Datacache

Instructioncache

Bus Integerdata-path

Floating-point

datapath

Page 31: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 31

The Von Neumann Model

Programs and data are both stored in the main memory of the machine

There is one CPU (Central Processing Unit)

The CPU has a control unit that fetches program instructions from memory, decodes them and executes them

Page 32: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 32

The Von Neumann Model Data is loaded from memory into

registers in the CPU The CPU contains circuitry to

perform basic arithmetic operations and to compare values, placing the results into registers

The values in the registers can be stored in main memory

Page 33: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 33

Input / Ouput

Input OutputPDA

PDA

Digitizing pad

PrinterKeyboard

MouseScanner

Those are only the ones I came up with when I wrote this slide…

Page 34: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 34

The Von Neumann Model

Input devices (keyboard, pda, cell phone, . . .) allow us to place data (and programs) into memory

Output devices allow us to display values stored in memory (on screen, pda, cell phone, . . .)

Page 35: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 35

Low Level Programming

Programmers in the late 1940’s had to use binary numbers to encode the instructions and the data

This was very time consuming and error prone so written mnemonic codes were created. Programs were written using these codes and then translated into binary by hand

Soon programs were written to convert these symbols to binary. These programs are called assemblers and the instruction names are called assembly language

Page 36: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 36

Assembler Example

We may want to evaluate the expressionf = (g + h) – (i + j)

Assembly program (where all the names refer to registers)add t0, g, hadd t1, i, jsub f, t0, t1

Load and Store instructions are part of the assembly language and allow transferring data values between memory and registers

Page 37: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 37

Assembly Language

Low level langauage Simple instructions of the formop result, arg1, arg2

Machine dependent – each processor has its own assembler

Page 38: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 38

High Level Languages

Programming in assembly language is still difficult and tedious

Programs are very specific to specific machines

High level languages provide a more natural mathematically based formalism for expressing algorithms

Page 39: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 39

High Level Languages

High level languages Hide details of memory allocation Allow expressing complex operations

together, not just one step at a time Provide a more natural way of

programming Allow programs to be ported from one

machine to another

Page 40: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 40

High Level Languages

These languages make it easier to write programs but they are still very formal, precisely structure languages that follow very specific syntax rules

In addition to learning how to formulate algorithms for the computer, we will have to learn the rules for these languages

Page 41: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 41

How Does This Work

Programs written in a high level language are translated into assembly/machine level programs

A program called a compiler does this translation

This program is stored in memory by a loader

We can then execute the program

Page 42: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 42

The Translation Process

compiler

source program

assembly program

linker/loader

native code

Page 43: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 43

Source Program A program written in a high level

language (FORTRAN, C, Java, C++, Ada)

Created with a text editor in human readable form

File name extension often says what language is used (a1.f90, a4.c, test.java)

Page 44: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 44

Compiler

A program that analyses the source program and translates it into a form the computer can understand

Result is not readable by humans Each high level language requires

its own compiler

Page 45: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 45

Linker/Loader

The Linker combines the assembler code with other programs that were compiled another time or are standard programs available in libraries (sin, sqrt, etc)

The Loader puts the complete program in memory and begins execution with the first instruction

Page 46: Fall, 2006Computer Strtucture1 Computer Structure Nathan Friedman Fall, 2006

Fall, 2006 Computer Strtucture 46

Coming Up Next

In our next lecture we begin to look at a high level language, FORTRAN

We will begin writing actual programs