uWaterloo Logo

CS 241 — Foundations of Sequential Programs

Supported by the Instructional Support Group.

University of Waterloo : Faculty of Mathematics : School of Computer Science

General Information

Jump to: Piazza (Announcements) ⋅ Marmoset | Current TermOffice-Hour-Booking AssignmentsQuizzesResources Additional Reference MaterialAcademic Integrity Policy

Current Term (Winter 2021)

Office Hour Booking for Winter 2021

Since all office hours are being organized online, we have created an online office hours booking page. Please visit the following link: Book Office Hours (the page might respond slowly, please be patient).


Assignments must be submitted using the Marmoset Submission and Testing Server. Read the section of the course outline on Marmoset usage before submitting.

The following instructions to submit to Marmoset from the command line may be useful.

Assignments will be added throughout the term.


Quizzes will be hosted on the course LEARN website.

Quizzes are typically due at 5:00pm on Wednesdays, and will become available at 5:00am on the preceding Monday. Any deviations from this schedule will be announced on Piazza.


MIPS Reference Sheet

MIPS Architecture Model

Additional Reference Material

Material for Assignment 1 (and beyond)

Material for Assignment 2 (and beyond)

Recommended Texts

  1. MIPS Assembly Language

    The first two and a half chapters of the CS251 textbook Computer Organization and Design by Patterson and Hennessy gives an introduction to processors, machine language and the MIPS architecture.
  2. Compiler Design

    Most books about compilers begin with materials about scanners and parsers, which we cover in the second half of the course. A textbook that is clear, concise, and available for free online is Basic of Compiler Design by Torben Mogensen.

Additional Reading

For more information about the MIPS instruction set in greater detail see MIPS RISC Architecture by Gerry Kane and Joe Heinrich.

For more information about compilers see Compilers: Principles, Techniques, and Tools, 2nd Edition by Alfred V. Aho and Monica S. Lam or Modern Compiler Implementation in Java, 2nd Edition by Andrew W. Appel and Jens Palsberg.

Language-Specific Resources



Academic Integrity Policy

Academic integrity: In order to maintain a culture of academic integrity, members of the University of Waterloo community are expected to promote honesty, trust, fairness, respect and responsibility. [Check the Office of Academic Integrity for more information.]

Grievance: A student who believes that a decision affecting some aspect of his/her university life has been unfair or unreasonable may have grounds for initiating a grievance. Read Policy 70, Student Petitions and Grievances, Section 4. When in doubt, please be certain to contact the department’s administrative assistant who will provide further assistance.

Discipline: A student is expected to know what constitutes academic integrity to avoid committing an academic offence, and to take responsibility for his/her actions. [Check the Office of Academic Integrity for more information.] A student who is unsure whether an action constitutes an offence, or who needs help in learning how to avoid offences (e.g., plagiarism, cheating) or about “rules” for group work/collaboration should seek guidance from the course instructor, academic advisor, or the undergraduate associate dean. For information on categories of offences and types of penalties, students should refer to Policy 71, Student Discipline. For typical penalties, check Guidelines for the Assessment of Penalties.

Appeals: A decision made or penalty imposed under Policy 70, Student Petitions and Grievances (other than a petition) or Policy 71, Student Discipline may be appealed if there is a ground. A student who believes he/she has a ground for an appeal should refer to Policy 72, Student Appeals.

Note for students with disabilities: AccessAbility Services, located in Needles Hall, Room 1401, collaborates with all academic departments to arrange appropriate accommodations for students with disabilities without compromising the academic integrity of the curriculum. If you require academic accommodations to lessen the impact of your disability, please register with AccessAbility Services at the beginning of each academic term.