Cps3340 computer architecture fall semester 2013
This presentation is the property of its rightful owner.
Sponsored Links
1 / 71

CPS3340 Computer Architecture Fall Semester, 2013 PowerPoint PPT Presentation


  • 93 Views
  • Uploaded on
  • Presentation posted in: General

Lecture 1: Overview Instructor: Ashraf Yaseen. CPS3340 Computer Architecture Fall Semester, 2013. 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.

Download Presentation

CPS3340 Computer Architecture Fall Semester, 2013

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 architecture fall semester 2013

Lecture 1: Overview

Instructor: Ashraf Yaseen

CPS3340 Computer ArchitectureFall Semester, 2013

Department of Math & Computer Science

Central State University, Wilberforce, OH

08/27/2013


Outline

Outline

  • Course Administration

  • Overview of CPS 3340: Inside the Computer

  • Binary Numbers


Administrivia

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

Administrivia-cont.

  • Instructional E-Mail Addresses

    • [email protected]

  • 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 cont1

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 cont2

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


Administrivia cont3

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

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

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

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

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

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

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

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

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 cont1

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


Topics cont2

Topics-cont.

  • Arithmetic

    • Addition and Subtraction

    • Multiplication and Division

    • Floating Point

    • Parallelism


Importance of this course

Importance of This Course

  • Foundation for advanced courses

    • Operating Systems

    • Programming Language

    • Compiler Design

    • Networking

    • Parallel Programming

    • Algorithm

    • I/O Management


About me

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

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

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


Greater expectations cont

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

  • 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 cont1

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

While in Class,

  • No Facebook

  • No Cell phone

  • No Music players

  • No Topic unrelated to class.

  • No Sleep

  • No Food

  • No bad jokes


Cps3340 computer architecture fall semester 2013

High-Level Overview of CPS 3340:

Inside the Computer


What is cps3340 about

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

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

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

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

Classes of Computers

  • Desktop computers

    • Personal computers (best-known)

    • General purpose, variety of software

    • Subject to cost/performance tradeoff


Classes of computers cont

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

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 cont1

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

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 box our focus

Inside the Box: Our Focus


Inside the box motherboard

Inside the Box: Motherboard


Inside the computer motherboard

Inside the Computer: Motherboard

PROCESSOR


Inside the computer motherboard1

Inside the Computer: Motherboard

MAIN

MEMORY


Inside the computer motherboard2

Inside the Computer: Motherboard

INPUT

OUTPUT


Inside the computer basic blueprint

Inside the Computer: Basic Blueprint


Inside the computer data flow

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

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

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


Cps3340 computer architecture fall semester 2013

The Basis for Machine Communication:

Introduction to Binary Numbers


Human language

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

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: 00113

    Instruction: 0001000110011 3 + 3

    Program: 000100011001111 swap two

    010101000000001 variable

    000010001010101 values


Machine language assembly language

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

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


Cps3340 computer architecture fall semester 2013

C Programswap(int v[], int k) {

int tmp;

tmp = v[k];

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

v[k+1] = tmp;}

MIPS AL Programswap: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 Program0000000010100001000000000001100000000000100011100001100000100001

10001100011000100000000000000000

011100011100011101001100010001 …

C compiler

MIPS assembler


Cps3340 computer architecture fall semester 2013

C Programswap(int v[], int k) {

int tmp;

tmp = v[k];

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

v[k+1] = tmp;}

MIPS AL Programswap: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 Program0000000010100001000000000001100000000000100011100001100000100001

10001100011000100000000000000000

011100011100011101001100010001 …

C compiler

MIPS assembler


Background number systems

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

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

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 Number System

  • Binary system (base 2) uses digits 0 – 1

  • Machine Language uses base 2

Invalid

Valid


Conversion from binary to decimal

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

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 binary1

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

Class Example: Convert Binary to Decimal

Convert 1011base 2 to ??base 10


Class example convert binary to decimal1

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

Class Example: Convert Decimal to Binary

Convert 22base10 to ?????base 2


Class example convert decimal to binary1

Class Example: Convert Decimal to Binary

Convert 22base10 to ?????base 2

22 6 2

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

620

22base10 = 10110base 2


Counting in the binary number system

Counting in the Binary Number System


Other number systems

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 systems1

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

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: 00113

    Instruction: 0001000110011 3 + 3

    Program: (sequences of instructions)


Boolean logic action of ml

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

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

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

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

Summary

  • Syllabus

  • Classes of Computers

  • Decimal, Binary, Octal, Hexadecimal Representations

  • Conversion btw. Different Representations


What i want you to do

What I want you to do

  • Review Chapter 1 and Class Slides

  • Enjoy your new semester


  • Login