CS 202 Computer Architecture Spring 2018

Course Information

Course Homepage:
go/cs202 or http://www.cs.middlebury.edu/~schar/courses/cs202-s18/

Time and Place:
MWF 10:10-11:00 (A) and 11:15-12:05 (B) in MBH 632

Professor:
Daniel Scharstein
640A McCardell Bicentennial Hall
443-2438
ude.yrub@middlerahcs

Office Hours:
MWF 1:30-2:30pm, Tue 10:30-noon, and by appointment

Lab Assistant:
Ruben Gilbert
rgilbert@middlebury.edu, 443-5915

Textbooks:


Course description

The goal of this course is to investigate how a computer works, how it is constructed, and how it can be programmed at the lowest level - in machine language, or assembly. We will discuss a variety of architectures, and study in depth the Intel architecture and x86-64 assembly language.

We will run our assembly language programs under Linux on the computer science lab machines in MBH 632. We will also write C programs that interact with the assembly language programs. Basic familiarity with Unix and Java (or C/C++) is assumed. To practice the design of digital circuits we will use the software Logisim.

Topics

The following is a tentative schedule of topics to be covered in this course. Readings refer to the texts by Bryant and O'Hallaron [BO] and Tanenbaum [T].

Week Date Topic Reading
1 2/12-16 Introduction, number systems, C T 1, A; BO 1, 2.1-3
2 2/19-21 Computer organization, instruction encoding, Σniac T 2, 5.1, 5.3
3 2/26-3/3 Σniac programming, Intel assembly, parameters BO 3.1-5; T 5.1-4
4 3/9-11 Addressing, comparing, branching, loops, arrays BO 3.4-8; T 5.4-6
5 3/12-16 Digital logic, gates, combinational circuits, Logisim T 3.1-2; BO 4.2
6 3/19-23 Sequential circuits, flip flops, midterm exam T 3.3
3/26-30 Spring break
7 4/2-6 Counters, registers, multiplier, stack frame T 3.3, 5.6-7; BO 3.7
8 4/9-13 Function calls, recursion, memory, ROM and RAM T 3.3, 5.6-7; BO 3.7
9 4/16-18 Buffer-overflow attacks, caches, optimization BO 3.10, 3.12, 5, 6.4-6; T 4.5
10 4/23-27 Microarchitecture, pipelines, branch prediction T 4.5-6; BO 5.7
11 4/30-5/4 Σniac circuit, Floating point operations BO 2.4, 3.14; T B
12 5/7-14 MMX / SSE, virtual memory, course review T 5.8, 6.1, 8; BO 9

Assignments, Exams, and Grading

There will be weekly homeworks, consisting of written assignments, programming assignments (in C and assembly), and/or circuit design assignments (using Logisim). There will also be quizzes to test the assigned reading, usually once per week at the beginning of class. The assignments will be challenging; in past semesters, students spent on average 5-8 hours on each homework. Start your assignments early! This will give you time to think about the problems and come to office hours if you get stuck.

Assignments will usually be due on Mondays in class. Work will not be accepted after the deadline. However, each student is allotted two 24-hour extensions to use for any homework assignment during the term. If you have not completed an assignment, you should still turn in whatever you have for partial credit. In extenuating circumstances (e.g., sickness, personal crisis, family problems, religious holidays), you may request an additional extension. Such extensions are more likely to be granted if the request is made before the due date. Missed quizzes can not be made up.

Your final grade will be based on homeworks (40%), quizzes (10%), a midterm exam (20%), and a final exam (30%). The lowest quiz score will be dropped when computing your final grade. The midterm exam is scheduled for Wednesday, March 21, 7-9pm. The final exam will be self-scheduled during the exam period (May 16-22). Both exams will be open book, open notes.

Collaboration Policy and Honor Code

The computer science faculty believes that collaboration fosters a healthy and enjoyable educational environment. For this reason, you are encouraged to talk with other students about the course and to form study groups.

Unless otherwise instructed, feel free to discuss problem sets with other students and exchange ideas about how to solve them. However, there is a thin line between collaboration and plagiarizing the work of others. Therefore, it is required that you must compose your own solution to each assignment. It is unacceptable (1) to solve a problem together and turn in two copies of the same solution or (2) to copy solutions written by your classmates. This implies that you should never have in your possession a copy of all or part of another student's work. It is your own responsibility to protect your work from unauthorized access. If an assignment (or part of one) is designated a group project, then the above rules apply to a group. That is, you are allowed to collaborate on the assignment with your partner(s), but work with others is restricted as discussed above. All exams, of course, must be entirely your own work and you may not collaborate with anyone.

In keeping with the standards of the scientific community, you must give credit where credit is due. If you make use of an idea that was developed by (or jointly with) others, please reference them appropriately in your work. E.g., if you get a key idea for solving a problem from person X, your solution should begin with a note that says "I worked with X on this problem" and should say "The main idea (due to X) is ..." in the appropriate places. It is unacceptable for students to work together but not to acknowledge each other in their write-ups. When working on homework problems, it is perfectly reasonable to consult public literature (books, articles, etc.) for hints, techniques, and even solutions. However, you must reference any sources that contribute to your solution. It is also OK to borrow code from the textbook, from materials discussed in class, and from other sources as long as you give proper credit. Assignments and solutions from previous terms are not considered to be part of the "public" literature, and consulting problem set solutions from previous terms constitutes a violation of the Honor Code.

If you are uncertain how the Honor Code applies to a particular assignment, please ask me. The Department of Computer Science takes the Honor Code seriously. Violations are easy to identify and will be dealt with promptly.

ADA information

Students who have Letters of Accommodation in this class are encouraged to contact me as early in the semester as possible to ensure that such accommodations are implemented in a timely fashion. For those without Letters of Accommodation, assistance is available to eligible students through Student Accessibility Services. Please contact the ADA Coordinators Jodi Litchfield (litchfie@middlebury.edu, x5936) or Courtney Cioffredi (ccioffredi@middlebury.edu, x2169) for more information. All discussions will remain confidential.