Loading in 5 sec....

CPS3340 Computer Architecture Fall Semester, 2013PowerPoint Presentation

CPS3340 Computer Architecture Fall Semester, 2013

- By
**dior** - Follow User

- 140 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' CPS3340 Computer Architecture Fall Semester, 2013' - dior

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

### CPS3340 Computer ArchitectureFall Semester, 2013

Instructor: Ashraf Yaseen

Department of Math & Computer Science

Central State University, Wilberforce, OH

08/27/2013

Outline

- Course Administration
- Overview of CPS 3340: Inside the Computer
- Binary Numbers

Administrivia

- Class Web Page
- http://www.cs.odu.edu/~ayaseen
- Syllabus
- Class Policy

- Class Notes
- Posted before class
- Read class notes before class

- Assignments
- Posted after class
- Pay attention to the due dates

- Blackboard
- Posting grades
- Sending out emails to class

Administrivia-cont.

- Instructional E-Mail Addresses
- Instructor: Ashraf Yaseen
- Office phone: 937-376-6365
- Office location: Henderson Hall, 139
- Office hours:
- M,W,F: 10:00AM-2:00PM
- T,R: 2:00PM-3:00PM
- by appointment

Administrivia-cont.

- Grading Policy
- Quizzes will be announced in class

- Late Assignment/HW Policy
- 0~24 hrs: -5%
- 24~48 hrs: -10%
- >48 hrs: grade = 0

Class participation and presentation quality will also impact final grade

Administrivia-cont.

- Your Written/Read Responsibilities
- 5 Homework
- Due at start of class on due date
- Emergency arrangements; else hand in early

- 1-3 Term Test;
- Final Exam: comprehensive exam.
- Course Project and Presentations: student-led reviews/material integration before exams
- Readings from textbooks – read before/after class

- 5 Homework

Administrivia-cont.

- Textbook
- Computer Organization and Design: The Hardware/Software Interface, 4th Edition, by Patterson and Hennessy, Morgan and Kaufman Publishers, Inc., 2009

- Reference
- Computer Organization (5th Edition) By Hamacher , Vranesic, Zaky. ISBN: 0-07-232086-9.

- Recommended Reading
- (electronic version): NASM, X86 Assembly language

CSU Honor Code

- The Honor Code applies to your conduct in this course. If you have questions, talk to me
- HOMEWORK:
- All submitted work must be your own
- Do not copy another student’s work
- Do discuss material and homework with classmates, professor
- If you work with someone, write this on the first page of your submitted work

- EXAMS:Do not give assistance to or receive assistance from anyone but professor
- Violations of this Code are treated seriously
- Evidence of cheating, plagiarism, or unauthorized collaboration will result in a 0 grade for quiz/assignment/exam
- May have further consequences

How to get help?

- Ask questions in class (or after class)
- Attend office hours
- Email me
- Make sure that you put “CPS3340” in your subject line
- Send it from your .edu account
- It wouldn’t come to my spam folder

- State clearly what you need in your email

How to Get an A in this Class?

- Attendance
- Attend class regularly and on time
- Ask questions
- Work on in-class exercises and labs

- Notes
- Read over class notes before class
- Review class notes after class

- Homework
- Get started as early as possible
- Contact me if you encounter problems

What You Will Learn

- Representing numbers in computers
- Binary, Octal, Hexadecimal
- Positive, Negative
- Floating Point Numbers

- Designing Computer Logic
- Computer Hardware Components

What You Will Learn-cont.

- How programs are translated into the machine language
- And how the hardware executes them

- The hardware/software interface
- What determines program performance
- And how it can be improved

- How hardware designers improve performance
- What is parallel processing

Understanding Performance

- Algorithm
- Determines number of operations executed

- Programming language, compiler, architecture
- Determine number of machine instructions executed per operation

- Processor and memory system
- Determine how fast instructions are executed

- I/O system (including OS)
- Determines how fast I/O operations are executed

Topics

- Overview of Computer Architectures
- Classes of computers
- Components of a computer
- Input
- Output
- Processing

- Programming languages
- High-level language
- Hardware language

- Performance
- Definition
- Measure

- Power wall

Topics-cont.

- Basics of Logic Design
- Gates
- Truth Tables
- Logic Equations
- Combinational Logic
- Hardware Description Language
- ALU
- Clocks
- Memory Elements
- Flip-Flops, Latches, and Registers
- SRAM and DRAM

- Timing Methodologies
- Programmable Devices

Topics-cont.

- Instructions of the Computer
- Operations and Operands of the Computer Hardware
- Logical Instruction
- Decision Making Instructions

- Representation of numbers
- Instruction representations
- Communication
- Addressing
- Synchronization
- Parallelism

- Operations and Operands of the Computer Hardware

Topics-cont.

- Arithmetic
- Addition and Subtraction
- Multiplication and Division
- Floating Point
- Parallelism

Importance of This Course

- Foundation for advanced courses
- Operating Systems
- Programming Language
- Compiler Design
- Networking
- Parallel Programming
- Algorithm
- I/O Management

About Me

- I got my bachelor’s from JUST (Jordan University of Science & Technology)
- Master’s from NYiT (New York Institute of Technology)
- Ph.D. (in process) ODU (Old Dominion University)
- My Research
- Computational Biology
- High Performance Computing

How about you?

- Tell us your nameand year
- In a few sentences, tell us about you, e.g.
- Where are you from?
- What is your major?
- Career plans or after-college plans?
- Favorite hobby, sport?
- Something interesting about yourself

- Expectation in this class

Greater Expectations

- Class Attendance & Participation: mandatory
- In-Class exercises/discussion questions
- Solidify your understanding
- Help gauge your understanding
- Increase interactivity (reduce boredom)

- You are expected to try your best in class
- By attending, you work less out class.
- If you miss class, you are responsible for learning what you missed

- In-Class exercises/discussion questions

Greater Expectations-cont.

- Student Presentations:
- Prepare/practice and cover all material clearly and concisely (set time limit)
- Refresh/integrate course material before exams
- Student explanation benefits audience, presenter
- Practice: presentation skills are a key to success

- Prepare/practice and cover all material clearly and concisely (set time limit)
- Submitted work: neat, complete, well-organized
- logic, programming, math: clearly show steps towards solution, comment programs
- Explanatory paragraphs: thoughtful, legible, grammatical, full sentences

Greater Expectations-cont.

- Behave and perform in a professional manner
- Be punctual, dress appropriately and be attentive
- Respect the rights of all participants by turning off any device that could cause a disturbance during class (this includes pagers, cell phones, personal alarms and iPod music players).

- Negative behavior patterns in class (e.g. unexcused absences, tardiness, and class disruptions, wearing hats, eating, drinking, smoking and sleeping) will be treated seriously
- could result in a reduction of up to 12.5% (labs) of a student’s final grade.

While in Class,

- No Facebook
- No Cell phone
- No Music players
- No Topic unrelated to class.
- No Sleep
- No Food
- No bad jokes

High-Level Overview of CPS 3340:

Inside the Computer

What is CPS3340 about?

- Introduce design and implementation of computer hardware
- Introduce major design advances in last decade: parallel processing of instructions and hierarchical memory organization
- Focus on prototypical modern architecture
- Not on specific computer brands (range)
- Not on electrical circuits (blueprint)
- Final Presentations integrate current issues

What Questions will CPS 3340 Answer?

- How are high-level programs (C, Java) understood by hardware?
- How are they executed by hardware?
- What is interface between computer’s software and hardware?
- How does software tell hardware to perform tasks?
- How can programmer improve program performance?
- How can hardware designer improve hardware performance?

Computing Applications

- “Computers” are everywhere today
- Innumerable individual computing applications, e.g.:
- ATMs
- Computers in vehicles (steering/braking/motion sensors)
- PDAs, Cellphones, Blackberries, IPods…
- Baby toys, kitchen appliances, …

3 Classes of Computing Applications

- Desktop/Personal Computers (best-known)
- Servers (widest range in cost/capability)
- Embedded Computers (widest range use/power)

Classes of Computers

- Desktop computers
- Personal computers (best-known)
- General purpose, variety of software
- Subject to cost/performance tradeoff

Classes of Computers-cont.

- Server computers
- Network based; Multiple users access via network
- Execute many small tasks at once (web); execute one huge job (weather forecast supercomputer)
- High capacity, performance, reliability
- Range
- Small file servers
- Supercomputers

Poor Man’s Super Computer

- What is a Cluster?
- “Collection of interconnected stand-alone computers working together as a single, integrated computing resource”

- Cluster consists of
- Nodes
- Network
- OS
- Cluster middleware

- Standard components
- Avoiding expensive proprietary components

Classes of Computers-cont.

- Embedded computers
- Hidden as components of systems
- Examples
- Computer in your car
- Processor in your cell phone

- Stringent power/performance/cost constraints

Prototypical Computer System

- All computing applications have a few key components:
- The computer (box) to do the computing
- Input devices (e.g. keyboard, mouse)
- Output devices (e.g. display, printer)
- Input/Output devices (disks, networks)

Inside the Computer: Motherboard

PROCESSOR

Inside the Computer: Data Flow

Computer

Main Memory

Devices

Processor

Control

INPUT

Datapath

OUTPUT

Data flows from input to memory to processor

Data is processed and flows back to main memory

Data flows to output devices for storage or display

Inside the Computer: Data Processing

Computer

Main Memory

Devices

Processor

Control

INPUT

OUTPUT

Datapath

Control gets program instructions from memory

Control tells memory, datapath,I/Owhat to do with data

Datapath gets data from memory and operates on it

Inside the Computer: Data Storage

Computer

Main Memory

Devices

Processor

Control

INPUT

VOLATILE

NONVOLATILE

Datapath

OUTPUT

Main memory: small, close,fast, expensive, volatile

2ndary (I/O) memory:big, far, slow, cheap,nonvolatile

The Basis for Machine Communication:

Introduction to Binary Numbers

Human Language

- Humans communicate via speech, text, image
English alphabet has 26 letters: a-z

Letter sequences form words: tree

Word sequences form discourse units (sentences, paragraphs):

Some trees have yellow leaves

Machine Language

- Machines communicate via electrical signals (conveyed through wires or wireless EM waves) (power supplied by current, battery)
Machine alphabet has 2 letters: 0, 1

(high/low voltage, on/off, true/false)

Letter sequences form meaningful units:

Data: 0011 3

Instruction: 0001000110011 3 + 3

Program: 000100011001111 swap two

010101000000001 variable

000010001010101 values

Machine Language Assembly Language

- Machine Language (ML) is easy for computers but time-consuming for humans
- Assembly Language (AL) was developed as a “more natural” symbolic code for ML
ADD 3,3 0001000110011

- Assemblers are programs developed to automatically translate AL to ML

High Level Programming Languages

- AL still thinking like a machine
- 1 AL instruction for every 1 ML instruction
- Why not develop a higher-level code for AL?

- High-level Programming Languages (PL) were developed as symbolic codes for AL
C, Java, Perl, etc.

- Compilers are programs developed to automatically translate PL to AL

C Program swap(int v[], int k) {

int tmp;

tmp = v[k];

v[k] = v[k+1];

v[k+1] = tmp;}

MIPS AL Program swap: muli $2, $5, 4

add $4, $2

lw $15, 0($2)

lw $16, 4($2)

sw $16, 0($2)

sw $15, 4($2)

jr $31

MIPS ML Program 00000000101000010000000000011000 00000000100011100001100000100001

10001100011000100000000000000000

011100011100011101001100010001 …

C compiler

MIPS assembler

C Program swap(int v[], int k) {

int tmp;

tmp = v[k];

v[k] = v[k+1];

v[k+1] = tmp;}

MIPS AL Program swap: muli $2, $5, 4

add $4, $2

lw $15, 0($2)

lw $16, 4($2)

sw $16, 0($2)

sw $15, 4($2)

jr $31

MIPS ML Program 00000000101000010000000000011000 00000000100011100001100000100001

10001100011000100000000000000000

011100011100011101001100010001 …

C compiler

MIPS assembler

Background: Number Systems

- In grade school: decimal system
- To “interpret” a digit sequence: assign each digit to a column, multiply each digit by the column, add them all together

2 x 100 + 3 x10 +7 x1’s = 237

Number Systems: Decimal System

- Decimal System = Base 10

- Base 10 uses digits 0 – 9
- Largest number represented with 3 columns?
- How do we represent a larger number?

Interpreting Number Systems

- For any Base B: use digits 0 – B-1 (digits greater than 9 replaced by letters)
- Each column represents B raised to an exponent, increasing to the left

Binary Number System

- Binary system (base 2) uses digits 0 – 1
- Machine Language uses base 2

Invalid

Valid

Conversion from Binary to Decimal

Convert 100111base 2 to ???base 10

- Assign each digit to a column (columns represent base raised to exponents increasing to left)
- Multiply each digit by the column, then add them all together

1 x 25 + 0 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + 1 x 20 =

32 + 0 + 0 + 4 + 2 + 1 =

39base10

Conversion from Decimal to Binary

Convert 237base10 to ??????base 2

- Find the largest power of 2 in the decimal number (trial and error)
- Record this largest power in its column
- Subtract this largest power: 237 – 128 = 109

Conversion from Decimal to Binary

- REPEAT 1-3 with remainder, until 0
- Record 0 for all powers not subtracted
109 45 13 5 1

- 64 = 26- 32 = 25- 8 = 23- 4 = 22 - 1 = 20

4513510

237base10 = 11101101base 2

Class Example: Convert Binary to Decimal

Convert 1011base 2 to ??base 10

Class Example: Convert Binary to Decimal

Convert 1011base 2 to ??base 10

1 x 23 + 0 x 22 + 1 x 21 + 1 x 20 =

8 + 0 + 2 + 1 =

11base10

Class Example: Convert Decimal to Binary

Convert 22base10 to ?????base 2

Class Example: Convert Decimal to Binary

Convert 22base10 to ?????base 2

22 6 2

- 16 = 24 - 4 = 22 - 2 = 21

620

22base10 = 10110base 2

Other Number Systems

- Octal system (base 8) uses digits 0 – 7

What’s the base 10 interpretation of 2378?

2 x 82 + 3 x 81 + 7 x 80 = 159base10

The interpretation of any digit sequence is dependent on the number system

Other Number Systems

- Hexadecimal system (base 16) uses digits 0 – 9, A-F

What’s the base 10 interpretation of 2BD16?

2 x 162 + 11 x 161 + 13 x 160 = 701base10

The interpretation of any symbolic sequence is dependent on the number system

Back to Machine Language

- Machines communicate via electrical signals, which have 2 values: high/low voltage
- Use Base 2 to represent machine language: 0, 1
- Binary number sequences (multiple signals) create larger units:
Data: 0011 3

Instruction: 0001000110011 3 + 3

Program: (sequences of instructions)

Boolean Logic: Action of ML

- A Machine Language instruction is a command for an operation to be performed
- Boolean Logic (BL):represents how operation carried out on inputs to yield output (Action of Operation)
- Logic Equation: describes action: output produced by combining inputs and logic operators
- Logic Block: displays action: output produced by combining inputs and logic gates
- gates encoded on chips with conductive material

- Truth Table: enumerates action: output produced by all possible input combinations

Atomic Logic Operator: AND

C = A AND B

C = A ● B

C = A B

C = A & B

(logical product)

iff A is true and B is true then C is true

(any # inputs)

True = 1

False = 0

Truth Table

Logic Gate

●

A

B

C

Atomic Logic Operators: OR

C = A OR B

C = A + B

C = A B

C = A | B

(logical sum)

iff A is true or B is true then C is true

(any # inputs)

True = 1

False = 0

Truth Table

+

Logic Gate

A

B

C

Atomic Logic Operators: NOT

C = NOT A

C = ¬A

C = A

C = A’

(inverse/inverter)

iff A is true

then C is false

True = 1

False = 0

Truth Table

Logic Gate

¬

A

C

Summary

- Syllabus
- Classes of Computers
- Decimal, Binary, Octal, Hexadecimal Representations
- Conversion btw. Different Representations

What I want you to do

- Review Chapter 1 and Class Slides
- Enjoy your new semester

Download Presentation

Connecting to Server..