Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 271 Winter 2013 Computer Architecture and Assembly Language MW10:00 – 12:00 AM Bldg 19 Rm 128 Instructor:Jim Bailey Office hours (19/146): MW: 12:00-1:00.

Similar presentations


Presentation on theme: "CS 271 Winter 2013 Computer Architecture and Assembly Language MW10:00 – 12:00 AM Bldg 19 Rm 128 Instructor:Jim Bailey Office hours (19/146): MW: 12:00-1:00."— Presentation transcript:

1 CS 271 Winter 2013 Computer Architecture and Assembly Language MW10:00 – 12:00 AM Bldg 19 Rm 128 Instructor:Jim Bailey Office hours (19/146): MW: 12:00-1:00 TuTh: 3:00-4:00 Other times by appointment

2 Assembler, Linker, IDE http://kipirvine.com/asm/gettingStarted http://kipirvine.com/asm/gettingStarted http://kipirvine.com/asm/gettingStarted Install Visual C++ 2010 Express Edition (if you don’t already have a version of Visual C++) Install Visual C++ 2010 Express Edition (if you don’t already have a version of Visual C++) Install the Microsoft Assembler Install the Microsoft Assembler Install the textbook's libraries Install the textbook's libraries

3 Prerequisites Official: CS 161J, 161C+, 133C# The real requirements: Analytical skills, problem-solving ability Analytical skills, problem-solving ability "Teaching" ability "Teaching" ability Flexibility, patience, persistence Flexibility, patience, persistence Integrity, responsibility Integrity, responsibility

4 Academic Honesty For group work: Each team member does his/her share. Each member works toward the team goal. For individual work: Discussion is encouraged, but each student is expected to produce and understand all aspects of his her own programs and solutions. For quizzes and exams: No sharing of information is permitted.

5 Academic Honesty If you are having trouble with an assignment … If you are having trouble with an assignment … discuss it with other students, TAs, the instructor, or anyone else who will listen discuss it with other students, TAs, the instructor, or anyone else who will listen don’t just have someone else tell you how to solve the problem! don’t just have someone else tell you how to solve the problem! If other students ask you for help, don’t just let them copy your work! If other students ask you for help, don’t just let them copy your work! It is possible to discuss problems without plagiarizing It is possible to discuss problems without plagiarizing One of the best methods of debugging is to explain your solution to someone else. One of the best methods of debugging is to explain your solution to someone else.

6 Academic Honesty If you get help from, give help to, or "work together" with someone … If you get help from, give help to, or "work together" with someone … you must (in the program header block) list that person as a collaborator and describe the help you must (in the program header block) list that person as a collaborator and describe the help Programs that are very similar will be subjected to review unless both programs indicate that they were produced collaboratively Programs that are very similar will be subjected to review unless both programs indicate that they were produced collaboratively If you get help from printed or online sources, you must cite your references If you get help from printed or online sources, you must cite your references The bottom line is: The bottom line is: Each student is expected to produce and understand all aspects of his/her own programs and solutions. Each student is expected to produce and understand all aspects of his/her own programs and solutions.

7 Course calendar All Resources will be in the Moodle Site All Resources will be in the Moodle Site Check here every week; the syllabus may be adjusted if it becomes apparent that more/less time is needed for some of the topics. Check here every week; the syllabus may be adjusted if it becomes apparent that more/less time is needed for some of the topics. PowerPoint slides will be available here after the actual lecture. Do not depend solely on these slides for the course material; much of the lecture material will be covered using other media. PowerPoint slides will be available here after the actual lecture. Do not depend solely on these slides for the course material; much of the lecture material will be covered using other media.

8 Course Learning Objectives 1.Identify the major components of a computer architecture, and explain their purposes and interactions. 2.Simulate the internal representation of data, and show how data is stored and accessed in memory. 3.Explain the relationships between a hardware architecture and its instruction set, and simulate micro-programs. 4.Create and simplify circuits that produce specified output for given inputs (e.g., adders, multiplexers, etc.). 5.Explain the Instruction Execution Cycle. 6.Explain the differences and relationships among high-level, assembly, and machine languages.

9 Course Learning Objectives 7.Write well-modularized computer programs in an assembly language, implementing decision, repetition, and procedure structures. 8.Use a debugger, and explain register contents. 9.Simulate the system stack as it is used for procedure calls and parameter passing. 10.Explain how editors, assemblers, linkers, and operating systems enable computer programming. 11.Explain various mechanisms for implementing parallelism in hardware/software.

10 Grading 4 homework sets @ 2.5% 10% 5 programming projects @ 5% 25% 3 quizzes @ 10% 30% (4 quizzes given, lowest score dropped.) Midterm exam15% Final exam (Mon., March 18, 10:00 am)20% NOTE: Extra credit may be available in any of the evaluation categories, but excess points in one category may not carry over to another category.

11 Scores will be posted Grades will be posted in Moodle within a week after due date Grades will be posted in Moodle within a week after due date It is your responsibility to check the posting frequently and report any errors with your scores. It is your responsibility to check the posting frequently and report any errors with your scores.

12 End administrative stuff End administrative stuff Begin CS 271 Begin CS 271

13 FHCs (Frequently Heard Complaints) “I’ve never seen any of this stuff before!” “I’ve never seen any of this stuff before!” “This is waaaaay beyond boring!” “This is waaaaay beyond boring!” “I know for sure that I will never use this stuff!” “I know for sure that I will never use this stuff!” (… so why should I learn it?) (… so why should I learn it?)

14 Introduction to Languages Viewed by "levels" Viewed by "levels" Natural languages Natural languages Used by humans Used by humans Many interpretations Many interpretations E.G.: English, Spanish, Chinese E.G.: English, Spanish, Chinese High-level programming languages High-level programming languages English-like, translated for computer by compilers English-like, translated for computer by compilers Strict rules of syntax and semantics Strict rules of syntax and semantics E.G.: Java, C++, Perl, Python E.G.: Java, C++, Perl, Python Low-level programming languages Low-level programming languages Mnemonic instructions for specific architecture Mnemonic instructions for specific architecture Translated for computer by assemblers Translated for computer by assemblers E.G.: Intel assembly, Mac assembly E.G.: Intel assembly, Mac assembly Machine-level computer languages Machine-level computer languages Actual binary code instructions for specific architecture Actual binary code instructions for specific architecture Can be represented numerically Can be represented numerically E.G.: Intel machine instructions, Mac machine instructions E.G.: Intel machine instructions, Mac machine instructions

15 Programming environments for various language levels Natural language Natural language word processors word processors High-level programming languages High-level programming languages Text editor, compiler, linker, loader (debugger) Text editor, compiler, linker, loader (debugger) E.G.: Eclipse, Visual C++, etc. E.G.: Eclipse, Visual C++, etc. Low-level programming languages Low-level programming languages Text editor, assembler, (debugger) Text editor, assembler, (debugger) E.G.: any text editor together with MASM, Visual C++, etc. E.G.: any text editor together with MASM, Visual C++, etc. Machine-level computer languages Machine-level computer languages Some way to assign machine instructions directly into memory Some way to assign machine instructions directly into memory E.G.: set individual bits (switches) E.G.: set individual bits (switches)

16 Introduction to Computer Architecture Viewed by "levels" Viewed by "levels" Each level has an associated language Each level has an associated language Lowest level (level 0) is the actual hardware with its associated machine language Lowest level (level 0) is the actual hardware with its associated machine language Highest level is a "virtual machine" with its associated high-level language Highest level is a "virtual machine" with its associated high-level language Program statements at level k (k > 0) are translated or interpreted into statements in the language that can be executed by level k-1. Program statements at level k (k > 0) are translated or interpreted into statements in the language that can be executed by level k-1.

17

18

19 Relationship A computer's instruction set is defined by the computer's architecture. A computer's instruction set is defined by the computer's architecture. I.E.: each computer architecture has its own machine language. I.E.: each computer architecture has its own machine language. E.G.: Mac machine instructions will not work on an Intel architecture. E.G.: Mac machine instructions will not work on an Intel architecture. Virtual machines can be used to simulate another computer's architecture. Virtual machines can be used to simulate another computer's architecture. Cross-assemblers can be used to covert a machine language to another machine language. Cross-assemblers can be used to covert a machine language to another machine language.

20 Relationship Hardware:Physical devices Hardware:Physical devices E.G.: circuits, chips, disk drives, printers, etc. E.G.: circuits, chips, disk drives, printers, etc. Software:Instructions that control hardware Software:Instructions that control hardware E.G.:assemblers, compilers, operating systems, word processors, games, etc. E.G.:assemblers, compilers, operating systems, word processors, games, etc.

21 Operating Systems Operating systems provide interfaces among users, programs, and devices (including the computer itself). Operating systems provide interfaces among users, programs, and devices (including the computer itself). An operating system is implemented in the host computer's machine language. An operating system is implemented in the host computer's machine language.

22 System Architectures Super-computer Super-computer Mainframe Mainframe Multiprocessor/Parallel Multiprocessor/Parallel Server Server Distributed (Collection of Workstations) Distributed (Collection of Workstations) Network Network Personal computer Personal computer Desktop, PDA, etc. Desktop, PDA, etc. Micro-controller (Real-time/Embedded system) Micro-controller (Real-time/Embedded system) Car, appliance, watch, etc. Car, appliance, watch, etc. etc. etc.

23 Two architecture tracks Build more powerful machines Build more powerful machines Build same machine smaller/cheaper Build same machine smaller/cheaper

24 How is assembly language related to hardware/software? We will use assembly language to implement some software. We will use assembly language to implement some software. Unlike most high-level languages, assembly language allows direct control of hardware components Unlike most high-level languages, assembly language allows direct control of hardware components Good way to really understand how the hardware works. Good way to really understand how the hardware works.

25 Other uses for assembly language Embedded systems Embedded systems Efficiency is critical Efficiency is critical Real-time applications Real-time applications Timing is critical Timing is critical Interactive games Interactive games Speed is critical Speed is critical Low-level tasks Low-level tasks Direct control is critical Direct control is critical Device drivers Device drivers Direct control is critical Direct control is critical

26 Metrics (measurements) Speed (distance/time) is measured in electronic units: Speed (distance/time) is measured in electronic units: K = 10 3, M = 10 6, G = 10 9, etc. K = 10 3, M = 10 6, G = 10 9, etc. Size in bits, bytes is measured in binary units Size in bits, bytes is measured in binary units K = 2 10, M = 2 20, G = 2 30, etc. K = 2 10, M = 2 20, G = 2 30, etc. We use Ki, Mi, Gi for clarity We use Ki, Mi, Gi for clarity E.G., 200 GiB hard disk E.G., 200 GiB hard disk E.G., 100K = 100,000 E.G., 100K = 100,000 100Ki = 102,400

27 Questions? Read:Irvine Chapter 1


Download ppt "CS 271 Winter 2013 Computer Architecture and Assembly Language MW10:00 – 12:00 AM Bldg 19 Rm 128 Instructor:Jim Bailey Office hours (19/146): MW: 12:00-1:00."

Similar presentations


Ads by Google