Some of the content in this syllabus is based on material originally provided by Dr. Michael Kirkpatrick.

Course Intro

High-level programming languages are powerful tools for computing, but these abstractions can make computers seem like magical boxes beyond our understanding and control. Users who are only familiar with the high-level abstractions are often forced to accept a persistent fear that things will fail for unknown and mysterious reasons.

The goal of this course is to "pull back the curtain" and demystify the machine, examining its structure and layers of abstraction. Along the way, we will explore many fascinating questions: What is information? Why might my calculator think that 2.2 + 1.1 is something other than 3.3? How can we turn simple on-off switches into while loops and other software? And what’s the big deal about DEADBEEF?

We will start by exploring important concepts of the C programming language and binary information storage. We will then examine how all code and data can be translated into a sequence of 1s and 0s that can be manipulated by physical hardware switches. Finally, we will look at the fundamental abstractions and interfaces that an operating system provides to support the execution of programs we use daily.

Course Model and Class Logistics

The Lam sections of this course will meet Tuesdays and Thursdays in King Hall 143. There are two sections, one 12:45-2:00pm and the other 2:20-3:35pm.

Please turn on notifications for Canvas announcements so that you don't miss any important information as the semester evolves.

This course uses a flipped classroom model. Research has shown that active learning methods are more effective than passively taking notes. You will watch lecture videos, read or skim selections from a textbook, and take a quiz prior to attending each class session. During class, you will spend most of your time working in small groups of 2-3 students to complete lab assignments that are designed to guide your group in a way that solidifies your understanding from the videos and readings and clears up common misconceptions. Unlike with traditional homework assignments, I will be available to answer questions and provide feedback as you complete these labs.

It is crucially important that you come to class prepared; i.e., having watched the videos, completed the assigned reading, and taken the quiz. It is ok if you are still uncertain or unclear about the topics, but coming in with the initial exposure will provide the foundation necessary to ask questions, complete the lab, and ultimately to achieve the level of content mastery that is necessary.

Health and Safety

JMU is known for its friendly and kind community. I expect the students in this class to exemplify this kindness both inside and outside the classroom in adopting common-sense measures to prevent the spread of COVID-19, the flu, and other contagious diseases. If you have tested positive for COVID-19 or are coughing and/or sneezing frequently, please DO NOT attend class, and contact me ASAP regarding missed class times. If you are feeling a bit ill but well enough to attend class (and are not coughing and/or sneezing frequently), please consider wearing a mask to protect others as you attend class.

Objectives and Expectations

This course provides a solid theoretical foundation of the design and implementation of modern digital computers. Mastery of this material allows students to develop a more sophisticated view of computing and the power of high-level software abstractions. Students who complete this course can expect to meet the following objectives:

  • Explain the machine-level representation of data and code
  • Summarize the architecture of a computer
  • Explain how powerful, complex systems can be built from simple logic circuits
  • Translate high-level code blocks into assembly and machine language
  • Write code to emulate the functionality of a computer
  • Cultivate a sense of power and control over computer systems
  • Gain an appreciation for the tools that facilitate software development
  • Develop a sense of play when writing code
  • Appreciate the principles and complexity of systems-level software

Course Topics

Here is a high-level overview of the topics covered in this course:

CS 261 mind map

Downloads: MindMap | PDF

Course Textbook

Computer Systems: A Programmer's Perspective (required)
Randal E. Bryant and David R. O'Hallaron

CS:APP is a very practical introduction to computer systems. It covers a wide range of low-level topics, some of which we won't cover this semester but which you will either see in later courses or will encounter at some point in your career. There is an electronic edition available to rent for considerably cheaper if you don't mind not having a physical copy.

Textbook Cover

C Programming Lanuage, 2nd Edition (optional)
Brian W. Kernighan and Dennis M. Ritchie

CPL is the classic "K&R" book on the C language, written by people who were intimately involved with the development of the Unix operating system and the C language. It holds up surprisingly well and is an excellent reference and tutorial on C. Several excerpts have been scanned and posted on Canvas (in the Files tab) for your use in this course (do not redistribute!).

Textbook Cover

Grading Criteria

You are responsible for all material discussed in lecture and discussion section and posted on the class web page, including announcements, deadlines, policies, etc.

Your final course grade will be determined according to the following percentages:

Reading Quizzes 10%
Group Labs 15%
Programming Projects 25%
Online Module Tests 15%
Written Midterm 15%
Written Final 20%

Unless otherwise noted (see below for project grading), grades will be assigned using a standard 90/80/70/60 grading scale with standard +/- cutoffs (0,3,7).

Late submissions for projects are graded according to the policy on the project guide. Quizzes are due by the deadline on Canvas, but at the instructor's discretion there may be a grace period where the quiz remains available for some short period (usually a few hours) after the due date. Labs are due at midnight on the day they are run or up to 24 hours late for a 2-point penalty, and are graded holistically out of ten points each (four points per page and two for on-time submission). Late submissions are not allowed for unit tests or written exams except in extenuating circumstances (see below for the excused absence policy).

Projects will be graded according to the rubric given in their description, and numeric points will be assigned as follows: A=95, A-=90, B=85, C=75, D=50, F=25. An additional five numeric points may be awarded based on manual inspection, with deductions taken for inconsistent code style, memory leaks, using unsafe functions, or other demerits as noted below and in the project description and project guide. P0 is intended as an instructional project and is therefore only worth 25% as much as the regular projects in calculating your final grade.

Completing the programming assignments is an essential part of the course. Therefore, I reserve the right to fail any student who does not make a good-faith attempt on all course projects, regardless of the student's performance or scores on the other coursework.

Final course letter grades may be curved at the end of the semester based on each student's overall performance for all coursework. Other factors that may influence a curve are your general performance trend over the semester (improving or degrading) and your general investment in the course (attendance and participation). These are aspects of the course for which I do not give formal grades, but they may factor into your final letter grade assignment.

If you believe I have made an error while grading your work or calculating your final score, please bring it to my attention after class or during office hours. If I determine that there has been a simple mistake, I will fix it immediately and no formal request is necessary.

If you believe an exam question or assignment has been graded unfairly, you must submit a verbal or written formal request for a regrade. Such requests must be submitted within one week of when the assignment in question is returned to you. Any coursework submitted for reconsideration may be regraded in its entirety, which could result in a lower score if warranted.

Instructor Contact Info

Please post generic questions to Piazza, where other students may answer and/or benefit from my answers. My email is lam2mo at the standard domain. My office is in King Hall 227, and my office hours are posted on Canvas and outside my office. There is also information about making an appointment to meet outside my office hours.

I do my best to respond to emails in a timely fashion. You may reasonably expect a response to an email inquiry within 24-48 hours during the week; feel free to re-send an email if you do not receive a response in that time frame. However, I do not guarantee responses over the weekend, and I do not guarantee any response at all to email inquiries sent during the last 24 hours before a project due date. This policy exists to encourage timely work on projects.

Course Policies

Important announcements will be made on Canvas or Piazza. Please make it a habit to check the web page, Canvas, and Piazza daily. I make an effort to broadcast announcements when the schedule changes, but you alone are responsible for missed assignment due dates. Do not rely on the Canvas sidebar to keep track of course assignments for you; it is not always reliable.

Although every effort has been made to be complete and accurate, unforeseen circumstances arising during the semester could require the adjustment of any material given here. Consequently, given due notice to students, I reserve the right to change any information on this syllabus or in other course materials.

You are permitted to use course materials for your own personal use only. Course materials may not be distributed publicly or provided to others (excepting other students in the course), in any way or format unless explicitly allowed.

Attendance and Participation

You must attend class during the first week of the semester in order to "claim" your seat in the class. To assure that the maximum number of students can benefit from the course, I reserve the right to drop any student who does not attend the first two classes of the semester. This frees up seats for students on the waitlist. If you have mitigating circumstances (i.e., health or travel issues) that prevent you from attending a class the first week, please notify me BEFORE that class time.

After the first week, attendance is not mandatory, and I generally do not give grades purely based on attendance. I view my students' time as valuable, and my goal as a teacher is to make class attendance and participation well worth the time investment for you. I strongly encourage you to attend every class session and participate fully in order to derive the maximum benefit of this course. If you believe that there is something I could change about the way I am handling the course in order to improve its effectiveness for you, please let me know via email or office hours.

It is very important to me that all students feel secure and included in my courses. I also believe that a diversity of background and experiences enriches the classroom. If at any time you have a concern about my classroom environment or your classmates, please talk to me immediately so that we can address the situation. If you wish to be called by anything other than what is listed in MyMadison (e.g., nicknames, pronouns, etc.), please let me know. If you wish to communicate with me without other students present, please email me to set up an appointment.

You may use the Piazza forum to ask general questions of interest to the class as a whole (e.g., administrative issues or project clarification questions) as well as to offer each other general advice on class assignments. However, do not post any information that would violate the university academic integrity policy. If you are unsure about this, please email me for approval before you post.

As a college student, there may be times when personal stressors interfere with your academic performance and/or negatively impact your daily life. If you or someone you know is experiencing mental health challenges at James Madison University, please connect with the Counseling Center (CC) located within the Student Success Center on the 3rd floor. You can learn more about available CC services by visiting their website or calling the Center (540-568-6552). Their services are free and confidential. Other available support resources to consider on campus include, but are not limited to the: Office of the Dean of Students, Health Center, Learning Strategies Instruction, and the Office of Disability Services.

Programming Projects

Projects must be submitted electronically following the instructions given in class and on the website. Projects may not be submitted by any other means (e.g., do not email your projects to me unless I request that). It is your responsibility to test your program and verify that it works properly before submitting it. Code that does not compile may receive a grade of zero regardless of other merit.

All projects are due at 23:59 (11:59pm) on the day indicated on the project assignment unless noted otherwise.

Projects may be submitted up to 72 hours late for a letter grade penalty per 24-hour period. For example, a submission that would have earned an "A" in an on-time submission will earn a "B" if submitted up to 24 hours late, or a "C" if submitted up to 48 hours late.

Project extensions will not generally be granted due to server congestion, system problems, network problems, power outages, etc., so do not wait to submit a project until the night it is due. No consideration in grading will be made for errors made in transferring files or submitting the wrong version of your project. Having a working, non-submitted version will not count; only submitted code will be be counted. I strongly urge you to use version control software and/or keep redundant backups of your work to avoid data loss.

You will be responsible for developing your own techniques for testing your projects before submitting it. I may grade your projects based on test cases not provided to you in advance. Because grading may be done automatically, you must follow the project specification exactly.

Your code will be graded on a combination of correctness, completeness, documentation, and code style. If you have any questions as to what constitutes good documentation or code style, be sure to ask ahead of time or refer to the provided style guide.

Any "hard coding" in a project assignment will result in a score of zero for that project, and is considered a bad-faith effort and potentially a violation of the honor code. Hard coding refers to attempting to make a program appear as if particular functionality has been fully implemented, when in fact it has not. One example of hard coding would be detecting a particular integration test case and printing the known expected output instead of computing it. If you have any questions as to what constitutes hard coding for a particular assignment, be sure to ask ahead of time.

Adding and Dropping the Course

Students are responsible for adding and dropping courses. Please consult the appropriate academic calendar for the exact deadlines. I will not give "WP" or "WF" grades to students requesting a drop after the deadline except in extraordinary circumstances.

Academic Honesty

You are expected to comply with the JMU Honor Code as stated in the Student Handbook and available from the Honor Council website on all assignments, projects, and exams.

Consulting with other students about problems and solutions is not necessarily a violation of the honor code, depending on the particular assignment. All final work turned in for an assignment must be your own unless it is a group project. In particular, you may not share (by giving or receiving) any source or binary code on programming assignments unless the project specification explicitly allows it. This includes but is not limited to: direct file copying, public repositories, AI-assist technologies (such as Github Copilot), detailed verbal descriptions, screen captures, and photos. If you are in doubt about whether something is an honor code violation, please contact me immediately.

If I find evidence of a violation of the honor code, I will bring the matter to the attention of the involved individuals via email and request a face-to-face meeting. As per section IV of the honor code, first time student offenders may agree that a violation has occurred and accept an appropriate penalty by submitting an "Informal Resolution Agreement Form" to the honor council. If the student is not a first-time offender or if there is disagreement about the violation or penalty, the matter will be referred to the honor council under section V of the honor code. The standard penalty for an honor code violation in this class is a grade of zero (0) on the assignment in question.

Disability Accommodations

If you need an accommodation based on the impact of a disability, you must contact the Office of Disability Services if you have not previously done so. Disability Services will provide you with an Access Plan letter that will verify your need for services and make recommendations for accommodations to be used in the classroom. Once you have shown me this letter, we will sit down and review the course requirements, your disability characteristics, and your requested accommodations to develop an individualized plan appropriate for this course. I will not make any accommodations without the appropriate documentation, as I am not qualified to diagnose disabilities.

Excused Absences

Besides the policies in this syllabus, the University's policies apply during the semester. Various policies that may be relevant appear in the Undergraduate Catalog.

Excused absences will be granted at my discretion and only with appropriate documentation. Please contact me as soon as possible if you wish to request an excused absence.

Missing an exam for reasons such as illness, religious observance, participation in required university activities, or family or personal emergency (such as a serious automobile accident or the funeral of a close relative) all are circumstances that may qualify as an excused absence. However, you must provide documentation that the absence qualifies as excused. I will arrange a makeup exam or substitute assignment at my discretion.

The policies for excused absences do not apply to in-class activities (which cannot be made up) or project assignments. Projects will be assigned with sufficient time to be completed by students who have a reasonable understanding of the necessary material and begin promptly. In cases of extremely serious documented illness of lengthy duration or other protracted, severe emergency situations, I may consider extensions on project assignments depending upon the specific circumstances. Please contact me as early as possible if you believe you will need such an extension.

Inclement Weather

This class will operate in accord with JMU's official cancellation policy.

Catalog Description

Introduction to operation of modern interrupt-driven computer systems. Explores the representation of software and information in binary memory, the primary components of a CPU, multithreaded programming, and basic interactions with an operating system.

Prerequisites: Grade of 'C-' or better in CS 159

Sections: 0003 and 0004
Instructor: Dr. Mike Lam
Credits: 3