Sie sind auf Seite 1von 19

ECE 495K: Introduction to Computer Systems:

An Engineering Perspective

Instructor: Prof. T. N. Vijaykumar


Purdue University
Spring 2009
Slides: Profs. Vijay S. Pai and T. N. Vijaykumar

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 1


What is this class about?
Demystify modern computer systems
• How they work – software and hardware
• There is no “magic”
• So you don’t write programs for a “black box”
– You understand how programs run

Target audience: Freshman students


• Anyone who will program computers
– Pretty much all engineers
• Anyone who will build computers
– Pretty much all computer engineers

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 2


What is this class about?

Broad coverage of computer engineering (CE)


• Shows how a computer’s parts are tied together
• High-level view of entire undergrad CE curriculum
– Intentional overlap with rest of CE curriculum
– Details expanded in rest of CE curriculum

Bottom-up approach
• From single bit to entire computer system
– Layer upon layer
• Cover enough details to see how everything fits together

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 3


What is this class about?
• Introduction
• Numerical representations and digital logic principles
• Computer organization
• Low-level (assembly) programming and I/O
• High-level programming in C
• Multicore programming opportunities and challenges
• Operating systems and networking (maybe)

Instead of teaching programming by itself, this course teaches


programming while explaining how the computer runs the
program – so you see how it all fits together

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 4


Why take this class?

Computers have revolutionized the way we learn, work, play,


and live
Computers affect almost every aspect of modern life
• First industrial Revolution, now Information Revolution –
this is huge!
• You use computers for almost everything you do
As engineers, you will build new hardware and software
• And not “just use”Explorer, Google, YouTube, X Box
So it is good to understand how computers work
• Enable you to do high-quality work with high efficiency

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 5


Structure of this class
~10 homeworks (about 2.5% each)
• ENAD 420 computer lab reserved M-F 3:00-6:00

2 midterms (about 25% each): in-class, closed book/notes


1 final (about 25%) closed book/notes
For questions on lectures and homeworks
– TA: Mohammad Sajjad Hossain, ECE graduate student,
sajjad@purdue.edu: MWF 4:30-6:00 TuTh: 3:00-4:30 in
ENAD 420 Lab (hands-on at a computer)
• Instructor office hours
– Tue 4:30-5:30, Wed 3:30-4:30 in EE building, room 334B
– Or by appointment: email vijay@ecn.purdue.edu

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 6


Course Materials

Textbook: Introduction to Computing Systems (2nd edition)


• By Yale N. Patt and Sanjay J. Patel

Lecture slides
• At course webpage http://shay.ecn.purdue.edu/~ece495k
– Thispage will have key material – check it out today!
• Slides will also specify reading assignments
– You should closely keep up with the reading
assignments else the next lecture won’t make sense and
soon whole chapter and later chapters won’t make sense
Other materials for topics not covered in book

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 7


Academic Honesty Policy

All exams are to be done individually, without the use of book,


notes, discussion with any other person, or any other material.
The homework assignments/projects are to be done
individually. Students may discuss principles of and
approaches to the homework before writing down the
solution, but (1) should not share solutions (program code,
logic diagrams, equations, or essay-style answers), and (2)
should not discuss once they start writing the solution (i.e., the
first word of the solution to any question in a homework).
Purdue and I have zero tolerance for cheating: the smallest
case of cheating will be put on the student’s permanent record.

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 8


Interactive Lectures

I like my classes to be highly interactive


Please raise your hand and ask if something is not clear
No question is stupid or trivial
No confusion is small or unimportant
Don’t think everybody else is getting it and you are the only one
confused
• If you didn’t get it then probably some others did not either
• By asking for clarification, you are helping everyone!
The course builds on itself so if something is not clear please
ask right away else you will not get later chapters

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 9


Any Administrative Questions?

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 10


Any Administrative Questions?

Ok, let’s dive right in!

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 11


Chapter 1
A computer system
• Processes information by running a computer program
• Processing involves arithmetic operations (e.g., add, divide)
• Done by the central processing unit (CPU) or processor
• There are other parts
– Keyboard, Mouse, Monitor
– Memory for temporary storage of data
– Hard disks, CD-ROMs for permanent data storage
– And software which include programs to be run

This course focuses on processor (and memory) and programs

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 12


Digital computers
In this course we study digital computers
There are analog computers (e.g., a slide rule)
But modern computers are digital (based on “0” or “1”)
• Digital circuits are much more robust than analog circuits
• Presence/absence of voltage (0/1) easier than how much
• It is easier to increase accuracy in digital than analog (by
adding more digits)
Early digital machines could do only one specific computation
• E.g., add or multiply
Digital computers are different: they are general and can
perform any computation

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 13


Two key ideas: Idea 1
All computers are equivalent in what they can compute
• Called “Church-Turing thesis”or “Turing’s thesis” after
famous mathematicians Alonzo Church and Alan Turing
• Computers are universal computational machines
• Mathematical model needs infinite memory which real
computers cannot have but not a problem in practice
A primitive computer can compute everything that a fancy
computer can
• Need to support only a small set of basic operations

So primitive and fancy computers differ only in speed (and


cost!) but not in what they can compute

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 14


Two key ideas: Idea 2
Deep inside, computers use electrical circuits and electrons to
do the job
Q: How do we go from high-level problems to electrons?
A: By building computers as layer upon layer connecting
high-level problems to electrons to do the job
The layers perform a series of transformations of problem
• Problem is transformed to electrical signals that control the
electrons to do the job
Computers are “layers of abstraction”- each layer does a small
transformation while abstracting away details of other layers
• Many small transformations much easier than 1 big one
• Layers allow us to “divide and conquer”
© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 15
Two key ideas: Idea 2
Computers are layers of abstraction
software Problem
Algorithm
Prog. Language and Interfaces
H/w – s/w interface Instruction Set Architecture
Microarchitecture (Organization)
hardware

Circuits
Devices (Transistors)
Bits

We will learn about all the layers and how they fit together

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 16


Two key ideas: Idea 2
Problem: What you want to do
Algorithm: Precise method to solve problem
Programming Languages and interfaces: Unambiguously
specify the method
• We get a program in this layer

Instruction Set Architecture (ISA): Small steps (or “instructions”


such as “add”) that a CPU can do (or “execute”)
• instruction sets vary for IBM/Intel/HP CPUs but all equal
• Each program is broken into a sequence of instructions

Microarchitecture: Hardware implementation of CPU’s ISA


• Hardware blocks (in CPU) to implement each instruction

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 17


Two key ideas: Idea 2
Circuits: Details of electrical circuits that implement each block
Devices (transistors): Circuits are built by interconnecting
transistors
Bits: Transistors operate on bits (“0” or “1”)

Hardware and software are equally important


• Knowing about one without the other is insufficient

Read: Chapter 1 and Chapter 2 (till page 25)

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 18


Where are we going next? Chapter 2
software
Problems
Algorithms
Prog. Lang & Interfaces
H/w – s/w interface Instruction Set Architecture
Microarchitecture (Organization)
hardware

Circuits
Devices (Transistors)
Bits

© 2009 Vijaykumar ECE495K Lecture Notes: Chapter 1 19

Das könnte Ihnen auch gefallen