Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to CS-215 Computer Organization & Assembly Language: Module 0.

Similar presentations


Presentation on theme: "Introduction to CS-215 Computer Organization & Assembly Language: Module 0."— Presentation transcript:

1 Introduction to CS-215 Computer Organization & Assembly Language: Module 0

2 Course topics u Computer Organization  Computer Components  CPU, memory, I/O devices, bus  Representing information  Integers, real numbers, text characters, machine code  Arithmetic operations u Assembly Language  Basic features  Translation (C++  assembly language)  Data structures  Procedures  Programmed I/O

3 Course activities u Computer Organization  Representing information  Encode and decode various types of data How is 3.14 represented by a computer? What unsigned integer is represented by the byte 11001010?  Arithmetic operations  Demonstrate the (addition/subtraction/multiplication/division) of two (integers/real numbers) using one of the algorithms for hardware operations presented in class Requires an understanding of the representations It is not enough to use conventional techniques and convert the result!

4 Course activities u Assembly Language  Translation (C++  assembly language)  Implement a C++ code fragment in assembly language  Procedures  Implement a C++ function in assembly language Use activation records  Programmed I/O  Write code which manages I/O to a device monitor, keyboard

5 Course resources u Text: A Programmer's View of Computer Architecture, Goodman & Miller u Website: http://cs.uwm.edu/~cs215  Syllabus  Lecture slides  Assignments  Language and simulator resources u Desire2Learn (D2L)  Announcements  Dropbox (assignment submission)  Discussion board

6 Focus: MIPS R2000 Assembly Language u The MIPS R2000 is an old CPU from SGI  Modern MIPS used in SGI workstations, Sony PS2  All MIPS chips use nearly the same assembly language  MIPS assembly language is very similar to that of the PowerPC chip, the heart of the Apple Macintosh u Why MIPS R2000  Simple, easily learned language  Straight-forward architecture  Freely available GUI simulator: SPIM

7 PCSpim u Initially developed at UW-Madison by James Larus u More stable than its Unix counterpart  Xspim is on both miller and grid u Has a graphic interface for easy debugging  More on PCSpim later

8 Why study assembly language? u Developing a more accurate model of computation is the main goal of this course u A software engineer who understands how a computer works will be able to:  design more efficient code  Find and fix problems with code that don't stem from the semantics of the source language  Correctly diagnose problems in a deployed application  hardware, OS, libraries, network, source code, etc.

9 What is a model? u A model is a partial representation of a system  incomplete  specific purpose u Multiple models for different purposes  Model of the city of Milwaukee for  MCTS bus driver  MMSD engineer  Bicyclist  Commercial airline pilot

10 Level of detail u Eliminating distracting detail enables focus on aspects of interest, get higher level perspectives  street maps for navigation do not show buildings and topography u More detail is NOT necessarily better  A detailed schematic of a car engine would not help the average motorist troubleshoot a sputtering engine  A flow chart would be better  A city map that shows every alley is less useful to a visitor than one that shows just major roads

11 Abstraction u Modeling is about abstraction:  building general, high-level concept pictures u Models often abstract away variation  Access to UWM computers requires authentication  The authentication abstraction filters out mechanism  login-password, fingerprint recognition, ID badge, etc. u Different abstractions, levels of abstraction depending on aspects of interest, degree of expertise

12 Learning is model refinement u The primary purpose of modeling is to improve understanding  Observing differences between the model and reality shows us gaps in our understanding  This is how learning works, according to educational theory  Cognitive dissonance  Learn is updating our model to better predict reality

13 Novice user’s model of computation u A computer is a machine that:  Can generate video and sound, like a TV  responds to input from a keyboard and a mouse  Unlike a TV  must be plugged into the Internet to work properly  Like a TV needs cable, or an antenna u This is a useful model for word-processing, email, web browsing, copying CD’s, etc. u Programming requires a more detailed model

14 CS-201 model of computation u A computer is a machine that executes a C++ program, by  Executing each line of the program sequentially, subject to control structures and function calls  Allowing the program to receive text input from the keyboard, or a file  Allowing the program to produce text output to the monitor, or a file C++ Program Computer

15 A more complex model of computation u A computer executes machine instructions, and can control a variety of input/output devices u Compiler  language definition  settings  implementation details u Operating system  resource allocation  device management u CPU  machine instructions  addressing modes CPU Operating System Compiler C++ Program


Download ppt "Introduction to CS-215 Computer Organization & Assembly Language: Module 0."

Similar presentations


Ads by Google