1 / 44

CDA 3100 Spring 2009

CDA 3100 Spring 2009. Special Thanks. Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course. Class organization. Class web page http://www.cs.fsu.edu/~zzhang/CDA3100_Spring_2009.htm Academic honor code

piperel
Télécharger la présentation

CDA 3100 Spring 2009

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. CDA 3100 Spring 2009

  2. Special Thanks • Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course

  3. Class organization • Class web page • http://www.cs.fsu.edu/~zzhang/CDA3100_Spring_2009.htm • Academic honor code • Programs you submitted must be your own work • While discussions of class materials and assignments are allowed, copying of solutions is strictly prohibited CDA3100

  4. Class Communication • This class will use class web site to post news, changes, and updates. So please check the class website regularly • Please also make sure that you check your emails on the account on your University record CDA3100

  5. Required Textbook • The required textbook for this class is • “Computer Organization and Design” • The hardware/software interface • By David A. Patterson and John L. Hennessy • Third Edition • Morgan Kaufmann Publishers, part of Elsevier • 2007 • We will cover chapters 1-4, part of 5, and appendix A,B CDA3100

  6. Lecture Notes and Textbook • All the materials that you will be tested on will be covered in the lectures • Even though you may need to read the textbook for review and further detail explanations • The lectures will be based on the textbook and handouts distributed in class CDA3100

  7. Programming Environment at CS • For this class, we will use “linprog” most of the time • “linprog” is a machine stack, consisting of four Pentium III machines • Running Linux 2.6.9 • Another available machine stack is “program”, consisting of four Sun workstations (Sun-Fire-V240, sparc ISA) • Running SunOS 5.10 • Using ssh to remotely login to these machines CDA3100

  8. What you will learn to answer (among other things) • How does the software instruct the hardware to perform the needed functions • What is going on in the processor • How a simple processor is designed

  9. Computer System Overview • A computer system consists of hardware and software that are combined to provide a tool to solve problems (with best performance) • Hardware includes CPU, memory, disks, printers, screen, keyboard, mouse ... • Software includes • System software • A general environment to create specific applications • Application software • A tool to solve a specific problem CDA3100

  10. Computer System Overview – cont. CDA3100

  11. Steps to Run a C Program • First we need to compile the program CDA3100

  12. Steps to Run a C Program • Then we need to run the program • The operating system locates where the program is • Then it loads the program into memory • The instructions in the program are then executed one by one • When the program is done, the operating system then releases the memory and other resources allocated to the program CDA3100

  13. Opening the Box CDA3100

  14. A Pentium 4 Processor Chip CDA3100

  15. Five Classic Components CDA3100

  16. Hierarchical Abstraction • We focus on principles underlying these computer systems using hierarchical abstractions CDA3100

  17. Hierarchical Abstractions • Applications/systems software • Assembly/machine language • Architectural issues: i.e., caches, virtual memory, pipelining • Boolean logic, 1s and 0s • Sequential logic, finite state machines • Combinational logic, arithmetic circuits • Transistors used to build logic gates (CMOS) • Semiconductors/silicon used to build transistors • Properties of atoms, electrons, and quantum dynamics • In this class we focus on the software-hardware interface • Known as the instruction set architectures (ISA) CDA3100

  18. Instruction Set Architecture • A very important abstraction • Interface between hardware and low-level software • Standardizes instructions, machine language bit patterns, etc. • Advantage: different implementations of the same architecture • Modern instruction set architectures • IA-32, PowerPC, MIPS, SPARC, ARM, …

  19. Market CDA3100

  20. Why This Class Important? • If you want to create better computers • It introduces necessary concepts, components, and principles for a computer scientist • By understanding the existing systems, you may create better ones • If you want to build software with better performance • If you want to have a good choice of jobs • If you want to be a real computer science major CDA3100

  21. Career Potential for a Computer Science Graduate http://www.jobweb.com/studentarticles.aspx?id=904&terms=starting+salary CDA3100

  22. Career Potential for a Computer Science Graduate Source: NACE Fall 2005 Report(http://www.jobweb.com/resources/library/Careers_In/Starting_Salary_51_01.htm) CDA3100

  23. Numbers • Numbers are abstraction of quantities • http://www.debtclock.com/ • How do we represent these quantities? CDA3100

  24. We humans naturally use a particular numbering system Decimal Numbering System CDA3100

  25. Decimal Numbering System • For any nonnegative integer , its value is given by • Here d0 is the least significant digit and dn is the most significant digit CDA3100

  26. Decimal Numbering System • For any nonnegative integer , its value is given by val = 0; While there are more digits, end CDA3100

  27. General Numbering System – Base X • Besides 10, we can use other bases as well • In base X, the value of CDA3100

  28. General Numbering System – Base X • Besides 10, we can use other bases as well • In base X, the value of val = 0; While there are more digits, end CDA3100

  29. Commonly Used Bases • Note that other bases are used as well including 12 and 60 • Which one is natural to computers? • Why? CDA3100

  30. Meaning of a Number Representation • When we specify a number, we need also to specify the base • For example, 10 presents a different quantity in a different base There are 10 kinds of mathematicians. Those who can think binarily and those who can't... http://www.math.ualberta.ca/~runde/jokes.html CDA3100

  31. Conversion between Representations • Now we can represent a quantity in different number representations • How can we convert from one representation to another one? • For example, how can we convert a decimal number to binary? • How can we then convert a binary number to a decimal one? • How can we convert between base X1 and base X2? CDA3100

  32. Conversion Between Bases • From binary to decimal example CDA3100

  33. Conversion Between Bases • From octal to decimal • From hexadecimal to decimal CDA3100

  34. Conversion Between Bases • From base X to decimal (base 10) CDA3100

  35. Conversion Program CDA3100

  36. Conversion from Decimal to Base X • Given 5023ten, what is the representation in the following bases? • Binary? • Hexadecimal? • Octal? CDA3100

  37. Conversion from Decimal to Base X • We have the following formula • How do we generate d0? CDA3100

  38. Conversion from Decimal to Base X • We have the following formula • How do we generate d0? • Divide by X, the reminder is d0 • How do we generate d1? • Divide the quotient by X again and the reminder is d1 CDA3100

  39. Conversion between Two Bases • We can always do the conversion in two steps, from base1 to decimal and from decimal to base2 • In some cases, the conversion is straightforward • For example, we often need to convert between a binary number and a hexadecimal number CDA3100

  40. Number Representations in Computers • Binary is the natural choice for computers • Since computers consist of transistors which have two different states • Additionally, for efficiency, we typically use a fixed number of bits • unsigned char • unsigned short • unsigned int • unsigned long • The least significant bit is the rightmost bit while the most significant bit is the leftmost bit • Overflow occurs if a number can not be represented correctly in the given format CDA3100

  41. Unsigned Formats and Their Ranges CDA3100

More Related