INSTRUCTOR : TANUJ VOHRA
OFFICE : FISHER 230
PHONE : 487-3492
E-MAIL : email@example.com
OFFICE HOURS : MWF : 1 - 2 (subject to change)
Note : The office hours are subject to change, final notice will be put up by March 17, 1997.
URL : http://www.cs.mtu.edu/~tvohra/
SYLLABUS : Provided in the handout
TEXT : "SPARC Architecture, Assembly Language Programming, & C" by Richard P. Paul
GRADING : Approximate Weighting
Home Assignments 50% Quizzes 10% Midterm Exam 20% Final Exam 20%
STUDENTS NEED TO PASS EACH COMPONENT OF EXAMS AND PROGRAMS IN ORDER TO PASS THE COURSE.
EXAM COMPONENTS: Final, Midterm, Quizzes
PROGRAMMING POLICIES - Students not allowed to work together on homeworks, programs or quizzes.
PLAGIARISM AND CHEATING POLICIES - as provided in the handout.
PROGRAMS - to be submitted electronically on or before the due date, late assignments/programs will not be accepted.
QUERIES REGARDING PROGRAM GRADES - to be submitted directly to the grader (e-mail : firstname.lastname@example.org)
OFFICE HOURS - Time limit of 15 minutes per student if others are waiting.
GRADE SCALE: (Absolute)
More than 90 : A 85-89 : AB 80-84 : B 75-79 : BC 70-74 : C 65-69 : CD 60-64 : D Less than 60 : F
Note: There will be no curving of the grades. For more information, please look at the CS240 home page under the sections General Information and Course Policy. The URL for the CS240 Home Page is:
A machine capable of executing a set of instructions at high speed, and with a great deal of accuracy.
A set of instructions given to the computer, to perform the desired task.
The information that is processed by the computer.
The physical components of the computer, e.g. keyboard, screen, disks, processing unit.
The programs that the computer executes.
· the computer only understands it's own machine language · it consists only of a sequence of 1's and 0's · difficult for a person to understand and translate
· not understood by the computer but easier than machine language for a person to understand · converted to machine language using a program known as the "assembler"
· much closer to English than the assembly language · almost machine independent · not unerstood by the computer so converted to the machine language using a program known as the "compiler" · examples are : BASIC, Fortran, C, COBOL, Pascal, etc.
How to design a general-purpose computer? We seek a machine that can solve a wide range of problems. To do this, we ask it to execute a wide range of program types: everything from Fortran and C to Lisp and Prolog. What we have to work with are wires and gates. How can we design such a high level machine from such low level components? This is called the semantic gap.
The basic answer is layering. We organize a computer as a series of layers. Each layer has a set of instructions that it can execute. The instructions of one layer (e.g., L2) are executed by using the instructions of the next lower layer (L1). Each layer can be thought of as a machine, the machine that executes the instruction set of that layer. The real machine is M1. All of the other machines are "virtual" machines.
L3 - instructions of virtual machine M3 | v L2 - instructions of virtual machine M2 | v L1 - instructions of "real" machine M1A program written in L3 is executed by converting all of the instructions in the program into instructions in L2, then executing the L2 instructions. Of course, L2 instructions are executing using L1 instructions.
Note the the person using, eg, L3 need not be aware of the existence or nature or L2 or L1. This allows the user to think the she is using machine M3 (even though it's only a virtual machine). Many people program in high level languages without ever knowing about the lower layers at work in the computer. However, people interested in how a computer really works, people interested in designing new computers, and people interested in designing new levels need to understand all the levels in a computer.
Instructions can be converted from a higher level language to a lower level language in two ways: translation, and interpretation. In translation, we execute a program in, say, L2, by replacing each instruction in it by an equivalent set of instructions from L1. The resulting program consists entirely of L1 instructions, and it can now execute on machine M1.
In interpretation, we write a program in L1 that takes programs in L2 as input data and carries them out by examining each instruction in turn and executing the equivalent sequence of instructions directly. This technique does not require first generating a program in L1.