Computer Science
>
>

CS 107 Computer Organization & Systems

Autumn 2022

Stanford University

This Stanford University course delves into the depths of computer systems and programming. It continues from the introductory sequence, expanding students' programming experience using the C language, exploring machine-level code, computer arithmetic, memory management, and more.

Course Page

Overview

CS107 is the third course in Stanford's introductory programming sequence. The CS106 courses provide you with a solid foundation in programming methodology and abstractions, and CS107 follows on this to build up and expand your breadth and depth of programming experience and techniques. The course will work from the C programming language down to the microprocessor to de-mystify the machine. With a complete understanding of how computer systems execute programs and manipulate data, you will become a more effective programmer, especially in dealing with issues of debugging, performance, memory, and robustness. Topics covered include: the C programming language, data representation, machine-level code, computer arithmetic, elements of code compilation, optimization of memory and runtime performance, and memory organization and management.

CS107A

CS107A, also called Pathfinders (or ACE), is a supplementary instruction program that meets for a weekly section and holds Pathfinders-specific review sessions. CS107A is application-only; please see the FAQ page for more information.

Prerequisites

The prerequisite for CS107 is CS106B/X (or equivalent). You should have practical C/C++ skills using recursion, dynamic data structures (pointers, linked lists, trees, graphs), data abstraction, classic data structures (lists, stacks, queues, sets, maps), and standard algorithms (searching, sorting, hashing). You should have an appreciation of the intrinsic value of good engineering and design and you will be expected to produce well-decomposed, readable code. Come talk with us if you need help determining the right placement for you.

Learning objectives

The goals for CS107 are for students to gain mastery of

  • writing C programs with complex use of memory and pointers
  • an accurate model of the address space and compile/runtime behavior of C programs

to achieve competence in

  • translating C to/from assembly
  • writing programs that respect the limitations of computer arithmetic
  • identifying bottlenecks and improving runtime performance
  • working effectively in a Unix development environment
  • using ethical frameworks and case studies to inform decision-making

and have exposure to

a working understanding of the basics of computer architecture

Textbooks and other notes

Required: Bryant & O’Hallaron. Computer Systems: A Programmer’s Perspective. 3rd Edition.

The bookstore has a less-expensive custom version of this textbook for our course that includes only the chapters we will cover; you can also use the regular full 3rd edition. You will need the 3rd edition of the textbook, which has substantial updates from IA32 to x86-64. There will be assigned readings from this textbook that are important preparation for lecture and lab. For readings that we assign, you can view a free digital PDF copy of the textbook on Canvas under the "Files" tab.

Strongly recommended: We also strongly recommend you have a "C language goto" in whatever form works best for you: textbook, tutorial, reference sheet, website, etc. As one suggestion, The C Programming Language by Kernighan and Ritchie is the classic text and a digital copy is available for checkout via Open Library (make a free account to "borrow" it digitally). Another option is Nick Parlante's Essential C reader PDF available here.

There is also a CS107 reader written by Chris Gregg, another CS107 instructor: https://web.stanford.edu/~cgregg/cgi-bin/107-reader, which covers all of the course topics in detail.

Our lecture readings pull from Bryant & O'Halloran, Kernighan & Ritchie, and Essential C.

Other courses in Computer Systems

CS 110: Principles of Computer Systems

Winter 2022

Stanford University

CSE 351 The HW/SW Interface

Autumn 2022

University of Washington

CS 107e Computer Systems from the Ground Up

Winter 2023

Stanford University

CS 107A: Problem-solving Lab for CS 107

Autumn 2022

Stanford University

ELE/COS 475 Computer Architecture

Fall 2019

Princeton University

Courseware availability

Slides available at Calendar

No videos available

Assignments available at Assignments

Labs available at Labs

Handouts available at Handouts

Covered concepts