ece291 – comp eng ii lecture 1 – overview and review

73
ECE291 – Comp Eng II Lecture 1 – Overview and Review

Upload: george-walsh

Post on 31-Dec-2015

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ECE291 – Comp Eng II Lecture 1 – Overview and Review

ECE291 – Comp Eng II

Lecture 1 – Overview and Review

Page 2: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Your Instructor

Josh Potts

[email protected]

(217)244-8032

242 Everitt Lab

Office Hours: 9-10 M-F

Page 3: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Your TA’s

Mike Urman

[email protected]

Karan Mehra

[email protected]

Page 4: ECE291 – Comp Eng II Lecture 1 – Overview and Review

ECE291 Web SIte

www.ece.uiuc.edu/ece291

Everything you need to know about ECE291

Page 5: ECE291 – Comp Eng II Lecture 1 – Overview and Review

ECE291 Lab

Location: 238 Everitt Lab

Hours: 24 Hour Access

Page 6: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Assignments

Homework is distributed, completed,and graded online.

MP Handouts are online.

Your textbook is online.

Access all of these from the 291 web site.

Page 7: ECE291 – Comp Eng II Lecture 1 – Overview and Review

NT Accounts

Go to www.ece.uiuc.edu/oics and click on “Create Account” to obtain your computer account for use in the

ECE291 lab. You should do this at least 24 hours prior to using the lab.

Page 8: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Evaluation

Your grade will be based on:

5 Homeworks

4 Machine Problems

1 Final Project

2 Exams

1 Final

Occasional Unannounced Quizzes

Page 9: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Course Goals I

ECE290 ECE291 (Everything in between)

Programming Classes

Binary numbers

digital logic,

state machines

Machine-level operations, computer

organization, data movement

High-level languages and algorithms

ECE291 bridges the gap between your logic classes and programming courses through assembly-level

programming of a real (80x86) computer

Page 10: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Course Goals II

You will become proficient in assembly-level programming

You will learn to organize large programs.

You will learn how to interface to hardware

Page 11: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Course Overview

Course Syllabus

Lecture, Exam, Homework, MP Schedule

Lab Staffing Schedule

Page 12: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Today’s Topics

History of computing

Rapid changes (Moore’s Law)

Review of previous classes

Page 13: ECE291 – Comp Eng II Lecture 1 – Overview and Review

A very short historyand historical perspective

Page 14: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1642

Blaise Pascal invents his mechanical calculator (counting device)

Page 15: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1830

Charles Babbage’s “Difference Engine”

First steam-powered “Analytical Engine”

Page 16: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1880’s

John H. Patterson’s Mechanical cash register (NCR)

First applications for computing devices

Page 17: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1930’s

Claude Shannon suggests use ofthe binary system for use

with electronic circuits

Page 18: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1940’s

John Von Neumann proposes reconfigurable computing by storing

programs in memory

Page 19: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1940’s – 1950’s

First electronic computersVacuum tubes &

mechanical relays: UNIVAC, ENIAC

30 tons150 Kwatts80 bytes of

memory

Page 20: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1940’s – 1950’s

ILLIACMetze et. al. play Illinois fight song on accumulator bit – first computer music

Page 21: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1948

John Bardeen, Walter Brattain, and William Schockley file patent on

invention of the transistor

Page 22: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1958

Jack Kilby introduces concept of the “Integrated Circuit”

Page 23: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1960’s

Computers begin to usetransistors and integrated circuits

Page 24: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1965

Gordon Moore observes that every chip produced contains roughly twice the capacity of its predecessor and that new generations of chips were being

released every 18-24 months

Page 25: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Late 1960’s

IBM MainframesPowerful, centralized CPU’s with terminalsAge of the “big iron”

Page 26: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1970’s

DEC PDP-11sLow-cost Mini-computersAge of the “Vaxen”

Page 27: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1974

Microprocessors Intel introduces the 8080 (a “toy”)Bill Gates is a sophomore at Harvard

Page 28: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1974

Altair 88008080 CPUAffordable ($379 kit)No screen (LEDs on

front panel)No storage4KB memory

Page 29: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1974

Bill Gates and Paul Allenstart writing BASIC

Your instructor was born.

Page 30: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1977

Radio Shack TRS-80

Apple II

Commodore-64

Page 31: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1980

IBM meets with Bill Gates to license BASIC and MSDOS (QDOS)

Page 32: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1981

IBM Personal Computer16-bit microprocessor: 4.77 MHz 8088ROM BASICCassette interface360KB floppy drive (optional)DOS 1.0~$5000

Page 33: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1982

Illiac-IV decommissioned

Page 34: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1983

Low cost computing10 MB hard disk costs just $3000640 KB of memory costs $1000

Compaq introduces“Portable Computing”

Page 35: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1984

Macintosh: GUI based on work at Xerox

IBM introduces PC-AT: 80286-based system

Record year for IBM

Page 36: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1985

First 32-bit 80x86 CPU’s Intel introduces the 80386Addresses up to 4 GB of memory

Page 37: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1986

First 32-bit 80x86 SystemsCompaq introduces first

80386-based system

Page 38: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1989

Intel introduces 80486,includes math co-processor or

floating-point unit (FPU)

Page 39: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1992

AMD/Cyrix 486 (Compatible CPU’s)

Intel introduces Pentium (64-bit memory bus)

Page 40: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1995

AMD/Cyrix introduces 5x86

1 GB hard drive costs $300 (1000 times cheaper/MB than in 1983!)

Page 41: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1996

Use of Reduced Instruction Set Computer (RISC) core to execute 80x86 instructions AMD K5 (RISC Ops = ROPS) Intel Pentium Pro

Superscalar Execution AMD K5/K6 Cyrix M1 (6x86) Intel Pentium Pro

Page 42: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1996

Powerful entry-level systems100 MIP CPU’s32MB DRAM12x CDROM’s

Page 43: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1997

Single Instruction Multiple Data (SIMD), Multimedia Extensions / Matrix Math Extensions (MMX)AMD, K6 Intel Pentium IICyrix/IBM M2 (6x86 MX)

Page 44: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1997

Low-cost computing233 MHz CPU w/MMX: $30064MB RAM: $300 (300 times cheaper/MB

than in 1983!)

Page 45: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1998

Low-power portable computing

Single Instruction Multiple Data (SIMD) for floating point ops (AMD K6-2)

Integrated CPU/Video/Audio (Cyrix/NSM MediaGX)

Page 46: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1998

Low-cost computing300 MHz MMX CPU + 3D: $12564 MB SDRAM: $7510 GB hard disk: $200

Page 47: ECE291 – Comp Eng II Lecture 1 – Overview and Review

1999

More floating point parallelism (Pentium III Katmai)Faster bus architectures (on-chip full speed caches)Explicit instruction-level floating-point parallelism (Itanium)Ubiquitous computing)Active networks

Page 48: ECE291 – Comp Eng II Lecture 1 – Overview and Review

2000

1 GHz processors from AMD and Intel

Judge rules to breakup Microsoft

Page 49: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Rapid ChangesMoore’s Law

Page 50: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Moore’s Law

Estimates that the number of transistors per chip doubles every 18 months

Exponential growth!

Has been true for 20 years!

Page 51: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Moore’s Law

2^(20 years / 1.5 years / double) = 2^13.3 = 10,000 x performance!

Page 52: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Moore’s Law

“If we had similar progress in automotive technology, today you could buy a Lexus for about $2. It would travel at the speed of sound, and get about 600 miles on a thimble of gas.”

- Randall Tobias: Former Vice Chairman of AT&T

Page 53: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Material Reviewfrom previous classes

Page 54: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Prerequisite Knowledge

ECE290 is the official prerequisite

Number systems

Base conversions

Signed and unsigned numbers

Page 55: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Number Systems I

Base 10 representation (decimal) (0..9): d[n]*10^n + d[n-1]*10^(n-1) + ... +

d[2]*10^2 + d[1]*10^1 + d[0]*10^0 Eg: 3045

= 3*10^3 + 4*10^1 + 5*10^0 = 3000 + 40 + 5 = 3045

Page 56: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Number Systems II

Base 2 representation (binary) (0..1): d[n]*2^n + d[n-1]*2^(n-1) + ... + d[2]*^2 +

d[1]*2^1 + d[0]*2^0 Eg: 101101

= 1*2^5 + 1*2^3 + 1*2^2 + 1*2^0 = 32 + 8 + 4 + 1= 45

Page 57: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Number Systems III

Base 16 representation (hex) (0..9,A..F): d[n]*16^n + d[n-1]*16^(n-1) + ... +

d[2]*16^2 + d[1]*16^1 + d[0]*16^0 3AF

= 3*16^2 + 10*16^1 + 15*16^0 = 3*256 + 10*16 + 15= 943

Page 58: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Number Systems IV

Pop quiz: Question 1

What is the decimal representation of the hexadecimal number C0FFEE?

Page 59: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Number Systems V

Addition OperationCompute sum of digits, modulo basePropagate carries to next digitMust use like bases when performing

arithmetic

Page 60: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Number Systems VI

Pop quiz: Question 2

Add 128 and 58. The resultshould be in base 8

Page 61: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Base Conversion I

Division/Remainder method: Long division by largest power of base

Example: Convert 45 to binary 45 divides by 32 (2^5) once, leaves 13 13 divides by 8 (2^3) once, leaves 5 5 divides by 4 (2^2) once, leaves 1 1 divides by 1 (2^0) once, leaves nothing [done] Thus: 45 (base 10) == 101101 (base 2)

Page 62: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Base Conversion II

Pop quiz: Question 3

Convert the decimal 112 into Base 3

Page 63: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers I

We need a way to represent negative numbers

Simple idea: use the first bit as a sign bit!s = 0: positive (+)S = 1: negative (-)

Page 64: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers II

Problem: There are TWO zeros1…0 and 0…0

Difficult to process negative numbers (special case)

There is a better way to handle negative numbers!

Page 65: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers IIITwo’s complement

Numeric Formula: -d[n]*2^n + d[n-1]*2^(n-1) + ... + d[2]*2^2 + d[1]*2^1 + d[0]*2^0

Notice the negative sign in front of d[n]

Page 66: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers IV

To subtract A-B, perform A+(-B).

Now the addition operator works for negative numbers

Notice: First bit still represents the sign of the numbers = 0: positive (+)s = 1: negative (-)

Page 67: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers V

Three methods to compute a negative number (n) (choose one method) Inverting bits then add 1Take largest number (all ones), subtract n,

add 1Scan n from right to left. copy zeros, copy

1st one, invert rest

Page 68: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers VI

Examples (8-bit): -1 = 1111,1111 -2 = 1111,1110 -128 = 1000,0000 +1 = 0000,0001 +127 = 0111,1111 +128 = Invalid

Page 69: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers VII

Examples: (16-bit) -1 = 1111,1111,1111,1111 -2 = 1111,1111,1111,1110 -32,768 = 1000,0000,0000,0000

Page 70: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers VIII

ObservationsWhen you move a piece of data to a larger

register (increasing the number of bits), just extend the Nth bit to the left.

Page 71: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Signed Numbers IX

Pop quiz: Question 4

Calculate the 2’s compliment binary representation of –56.

Use the minimum number of bits to represent this number.

Page 72: ECE291 – Comp Eng II Lecture 1 – Overview and Review

For Next Time…

Read Hyde (online):Sections 1.0-1.3, 1.7

Read Brey:Chapter 1, Browse Chapter 2

Read Lab Manual: Table of Contents, Sections 1, 2-1, and 2-2

Start HW0 (Due Thursday)

Page 73: ECE291 – Comp Eng II Lecture 1 – Overview and Review

Next Lecture

80x86 Organization and Architecture, memory, segmentation, registers, C/assembler similarities.