6502 simulation from visual6502.org

COMP 273 - Introduction to Computer Systems, Winter 2021

General Information

Lectures Section 001 11:35 AM - 12:55 PM, Mondays and Wednesdays
Inverted Classroom Section 002 2:35 PM - 3:55 PM, Mondays and Wednesdays
Location Zoom link and recordings on MyCourses
Credits 3
Instructors Section 001 - Hsiu-Chin Lin
Section 002 - Paul Kry
Prof Office Hours 10:00 AM - 11:00 AM Wednesdays (see MyCourses for details)
MyCourses For discussion boards and assignment submission
Teaching Assistants See MyCourses for TA contacts and office hours


COMP-206: Introduction to Software Systems. Anyone who has not taken COMP-206 (and is not taking it this term) will be automatically deregistered from COMP-273.


This course covers two major topics in computer systems: assembly language programming and the architecture of a CPU. Programmers are normally familiar with the computer only from a very high level. This is understood as manipulating the computer using an object oriented programming language. They are not aware of the many abstraction layers that hide the underlying structure and functions carried out by a computer. The computer's circuits, Operating System and machine language manage the underlying mechanics. This course peals back these layers of abstraction allowing the student to directly manipulate and study the engineering of some of the most important components of a computer. Our method of study will be two sided: On one side, we will look at the engineering of the computer's CPU, RAM and topics about the motherboard as a whole. On the other side, we will learn the MIPS assembly language, as a tool to interact with the internal components as directly as possible. We will use Logisim-evolution for logic simulation, and MARS as a MIPS simulator (see links below).

Primary learning outcomes: to get a clear understanding of how the CPU and RAM are built and function from the microcircuit and functional levels. To then use an actual assembly language that uses the microcircuits discussed in class.

Secondary learning outcome: to demystify the abstraction layers in a computer system and to take advantage of this knowledge in creating better software. The student will be able to intelligently discuss the internal workings of computers and produce solutions that take advantage of the built-in hardware of a machine.

Topics to be covered include: boolean algebra, digital circtuit design, number representation, assembly programming (MIPS), floating point, I/O and interrupts, caches, virtual memory, and CPU Organization. Other topics may be visited where appropriate during the term.

Class Format / Getting Started

With remote teaching, the two sections of this class have been crosslisted and will be co-taught by the instructors. Section 001 will consist of formal lecture on zoom, with the recording available under the lecture recordings tab in MyCourses. Section 002 will work more as an inverted classroom, will consist of a variety of activities such as tutorials, live coding, and workingin groups. Some sessions of seciton 002 (e.g., tutorials) will be recorded. Students enolled in either section can attend the classes they prefer, or both. Those students attending only section 002 are strongly encouraged to review the slides posted in advance of class and do the readings listed at the end of each slide, or watch the video recordings of section 001 (or both). During the term, some time in either or both sections will be devoted to helping you get started with Logisim-evolution and MARS. These tools can also be discussed in the online forum on MyCourses.

  • Logisim-evolution. Please run and select Tutorial and User's guide under the Help menu. Read through the first four chapters in the guide (beginner's tutorial, libraries and attributes, subcircuits, and wire bundles). They are short and provide a great reference for getting started.

  • MARS official site, but download and use this patched version instead, which has a faster instruction counter that we will use late in the term. Please see the MIPS and MARS tabs under the help menu. Note that the MARS tab will be most useful in getting started with the IDE, while the MIPS tab mostly provides a reference to MIPS assembly.

Assignments, Exercises, and Exams

There will be four assignments during the term, covering logic, numbers, circuits, MIPS programming, and other topics related to the course. Assignments are worth a total of 50%. All work must be your own. All work must be submitted by MyCourses. Show your work. You have the right to submit in English or in French. Assignments submitted late will penalized 10%. No work will be accepted after three days (i.e., a mark of zero will be assigned). The late penalty can be waived once during the term by request in the readme file submitted with your assignment (note the late deadline still applies). Please use this for any sickness, time management, or any other personal reason. Practice problems, old midterms and final exams, and in some cases solutions will also be posted to MyCourses during the term.

There will be two exams, worth a total of 50% of the final grade. The time and location of the midterm exam can be found in the MyCourses calendar. The midterm is worth 20% of your grade. The Final exam will is worth 30% of your final grade.


  • Introduction
  • Binary and number representations
  • Floating point
  • Binary functions and gates
  • Combinatorial and sequential circuits
  • Registers and memory
  • Multiplicaiton, division, finite state machines
  • MIPS arithmetic
  • Decisions
  • Procedures
  • Logical and shift
  • Instruction representation (two classes)
  • Floating point
  • Linking and running
  • I/O polling and interrupts
  • Cache (two classes)
  • Virtual memory (two classes)
  • Datapath
  • Control
  • Pipeline (two classes)
  • Final review


The following course textbook is recommended, and is available for purchase at the McGill bookstore.
  • Patterson, David A. and Hennessy, John L., "Computer Organization and Design: The Hardware/Software interface" Morgan Kauffman Publishers, 4th, 5th, 6th, or zybooks edition.

The main course textbook will be on reserve in the Schulic Library, and is also available as an interactive online book through zyBooks. If you are asking the question, "what is a zyBook?", then click the link to watch a video.

Other resources, such as lecture notes and handouts, will be made available on MyCourses.

In case you didn't already know...

McGill University values academic integrity. Therefore, all students must understand the meaning and consequences of cheating, plagiarism and other academic offences under the Code of Student Conduct and Disciplinary Procedures. See www.mcgill.ca/integrity for more information, as well as www.mcgill.ca/students/srr/honest with respect to student rights and responsibilities.

It should be noted that, in accordance with article 15 of the Charter of Students' Rights, students may submit examination answers in either French or English.

According to Senate regulations, instructors are not permitted to make special arrangements for final exams. Please consult the Calendar, section, General University Information and Regulations at www.mcgill.ca. Special arrangements in emergencies may be requested at your Student Affairs Office. If you have a disability, please advise the Office for Students with Disabilities (398-6009) as early in the term as possible so that we can provide appropriate accommodation to support your success.

In the event of circumstances beyond the instructor's control, the evaluation scheme as set out in this document might require change. In such a case, every effort will be made to obtain consensus agreement from the class.

Additional policies governing academic issues which affect students can be found on the Student Rights and Responsibilities page.