1 / 15

Introduction to CS-215

Computer Organization & Assembly Language: Module 0. Introduction to CS-215. Course topics. Computer Organization Computer Components CPU, memory, I/O devices, bus Representing information Integers, real numbers, text characters, machine code Arithmetic operations Assembly Language

irina
Download Presentation

Introduction to CS-215

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

  3. Course activities • 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 • 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 • Text: A Programmer's View of Computer Architecture, Goodman & Miller • Website: http://cs.uwm.edu/~cs215 • Syllabus • Lecture slides • Assignments • Language and simulator resources • Desire2Learn (D2L) • Announcements • Dropbox (assignment submission) • Discussion board

  6. Focus: MIPS R2000 Assembly Language • 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 • Why MIPS R2000 • Simple, easily learned language • Straight-forward architecture • Freely available GUI simulator: SPIM

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

  8. Why study assembly language? • Developing a more accurate model of computation is the main goal of this course • 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? • A model is a partial representation of a system • incomplete • specific purpose • 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 • Eliminating distracting detail enables focus on aspects of interest, get higher level perspectives • street maps for navigation do not show buildings and topography • 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 • Modeling is about abstraction: • building general, high-level concept pictures • Models often abstract away variation • Access to UWM computers requires authentication • The authentication abstraction filters out mechanism • login-password, fingerprint recognition, ID badge, etc. • Different abstractions, levels of abstraction depending on aspects of interest, degree of expertise

  12. Learning is model refinement • 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 • 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 • This is a useful model for word-processing, email, web browsing, copying CD’s, etc. • Programming requires a more detailed model

  14. CS-201 model of computation • 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 • A computer executes machine instructions, and can control a variety of input/output devices • Compiler • language definition • settings • implementation details • Operating system • resource allocation • device management • CPU • machine instructions • addressing modes C++ Program CPU Operating System Compiler

More Related