0% found this document useful (0 votes)
30 views

Lecture 1

This document provides an overview of the COMP 120 Spring 2002 course taught by Joe Capowski. It introduces the course topics, textbook, assignments, schedule, and expectations. The course will cover digital logic, data representation, computer architecture, and assembly language programming in three parts. Students are expected to read the first chapter and do exercises for the next class. The document outlines the course structure and policies to prepare students for the semester.

Uploaded by

TikaaDantS
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Lecture 1

This document provides an overview of the COMP 120 Spring 2002 course taught by Joe Capowski. It introduces the course topics, textbook, assignments, schedule, and expectations. The course will cover digital logic, data representation, computer architecture, and assembly language programming in three parts. Students are expected to read the first chapter and do exercises for the next class. The document outlines the course structure and policies to prepare students for the semester.

Uploaded by

TikaaDantS
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 48

Lecture 1

Comp 120 Spring 2002


Joe Capowski
336 Sitterson Hall
962-1793
[email protected]

Class Roll
My first chance to learn who you are
Everyone will be accepted into the course
Anyone not on roll: print your name and
PID on the last page

Questionnaire
Please turn them in

Teaching Assistants
Joshua Stough [email protected]
Office 349 Sitterson 962-1975
Hours: Tues 1-2:30, Friday 3:30-5
Fang-Yi Tsai
[email protected]
Office 041 Sitterson 962-1916
Office hours will be posted on website
4

Class Schedule

Tues and Thurs 2 - 3:15 Sitterson 014


Come to class! Some stuff is presented
only here.
Will not follow book exactly
Class will be interactive

Textbook

Patterson and Hennessey


Computer Organization and Design
Morgan Kaufmann Publishers
Excellent book, but chapters out of the order
we will use
Pay attention to green boxes The Big Picture
7

What is Comp 120?

The stuff in the machine and how it works


Digital logic
Circuit components
Data representation
Architecture and implementation
Assembly language programming
8

Comp 120 has 3 parts


Basics and Assembler language

Chapters 1, 3, 4, appendices A, B-1


Processor and performance

Chapters 5, 2, appendices B-2, C


Enhancements for speed and capacity, I/O

Chapters 6, 7, 8
9

Comp 120 Prerequisites


Formal: Comp 114 or my permission
Informal:

A year of programming in some high


level language, e.g., C, C++, Java

Access to a computer with a compiler

Lots of experience using PCs, Windows

Intellectual curiosity; whats in the box?


10

Course webpage
Visit it every day for current info,
announcements, lecture notes, etc.
www.cs.unc.edu (dept home page)

select academic affairs

select course home pages

select this course


11

Lecture notes on website


Available a few days in advance
Download and print before class to save a

lot of verbatim note-taking


Instructions on website under Frequently

Asked Questions (FAQ)

12

Non-programming assignments
Turn them in on their due date at the start of

class on paper
Collaboration is strongly encouraged, but
each person must understand what he turns in

13

Programming Assignments
Start early.never wait until night before

Hard to predict how long it will take

Usually takes more than one sitting

Need time to think and discuss

Unanticipated events will occur

14

Programming assignments
Do them in any campus computer lab, or

on your own computer


SPIM simulator is installed on campus

machines
Download it onto your own machine as

explained on page xvii of the textbook


15

Programming Assignments
Comp Sci dept has two computing labs,
SN 019 and SN 030, not sure yet what
their status is for Comp 120

16

Programming assignments

Download copy of grading sheet from webpage


Turn in grading sheet, your listing, printout of
results if applicable, all stapled together.
Include an honor code pledge in the comments of
the listing.remember to sign it.
Turn the package in at the start of class.
17

Programming assignments
I emphasize:
Clarity -- must be understandable to human
Simplicity -- no payoff for being cute
Computer efficiency rarely important
Program short length rarely important
18

Prog Assignments -- Collaboration


Collaboration OK, even encouraged
discuss and understand assignments
discuss techniques and concepts
but...

19

Prog assignments -- collaboration


Each student must independently

Devise his problem solution

Enter his own program

Debug and run his own program

Understand his own program


More description on course handout
20

Keep your returned materials

The assignments build on each other.


We record about many grades, so we
do make mistakes
If you think we erred, your information is the
proof
Keep everything until you get your final grade
21

Comp 120 is the most important course


you will ever take ..

22

Principles endure
Details change to increase speed and capacity
My personal story

23

Assignment for Tues, Jan 17


Read course handout
Read P&H Chapter 1
Do exercises 1.1 through 1.44

(dont panic, theyre just match the

definition things)

24

Ready for first substance?

25

What is computer?
Any ideas?

26

Computer: electronic machine that

Stores numeric data


Does logical and arithmetic operations
on the data
Receives data from user
Presents data to user
Obediently follows your program
27

A computer has..
Four basic parts

Computer Memory

Magnetic Memory Devices (disks)

Central Processing Unit (CPU)

Input-Output (I/O) devices

28

H&P list 5 functional parts

Data path
Control
Part of the Central Processing Unit (CPU)
Memory
Input devices
Output devices
29

5 Classic Computer Components

30

Central Processing Unit (CPU)

Decodes and executes machine language


instructions
Fetches instructions and data from memory
Calculates results and returns them to memory
Datapath: the circuits where the data flow
Control: hardware that decodes instructions and
controls the data flow, like a traffic cop.
31

Principle of Abstraction

Hardware and software have hierarchical layers


Lower layers hide details from higher ones
The user or programmer doesnt have to know the
lower level details to use the system
Driving a car is a good analogy
But analogy fails when you need performance
Implementation: how the details are constructed
32

Three levels of language


High Level Language (e.g., Java)

change = cash - cost - tax;


Assembler Language

mov cash, temp

sub cost, temp

sub tax, temp

mov temp, change


33

Three levels of language


Machine Language

10100101 1011010, 1010010

10010101 1101101, 1110101

10010101 1101001, 1110101

11101101 1101100, 1101101


All three levels do the same thing
High level is best for a person
34

Instruction Set Architecture


Design the hardware to execute the machine

language exactly
ISA is the interface between the machine

language and the hardware

35

Instruction Set Architecture


Good News: different implementations of

hardware are possible with no change

in software
Bad News: Sacrifice speed enhancements

that would be possible by changing the

software.

36

Instruction Set Architecture


Big Messages:
Hardware and software are related -- you

need to design them simultaneously

if you want maximal performance.


Sacrifice some performance or increase

complexity (cost) to keep software

constant (e.g., Family of 360 machines)


37

Three levels of language


High Level Language (e.g., Java)

change = cash - cost - tax;


This one statement has:

three operands

two operators
38

Three levels of language


Assembler Language

mov cash, temp

sub cost, temp

sub tax, temp

mov temp, change


One operator, two operands per statement
39

Close with some pretty pictures

40

Inside the case


b. Processor
c. PCI slots
e. Memory slots

41

Motherboard

42

Processor
Pentium III Xeon

43

Memory

RAM
DRAM
SRAM
ROM
Volatile / Non-Volatile
Magnetic
44

Hard Drive

45

Cathode Ray Tube


CRT

Cathode
Deflection plates
Electron Beam

Screen covered with Phosphor


46

Mouse

47

End of Lecture 1

48

You might also like