Computer Science
>
>

CS 240 Foundations of Computer Systems

Spring 2023

Wellesley College

This course explores the inner workings of computers, focusing on how they execute programs. Students gain an in-depth understanding of software and hardware abstractions, ranging from programming languages to transistors. Key areas covered include computational building blocks, hardware-software interfaces, data representation, and practical system abstractions. The course also emphasizes structured reasoning about program execution and promotes skills for independent learning, critical thinking, and problem-solving in computer science.

Course Page

Overview

CS 240 examines how computers run programs, introducing key abstractions and implementations in software and hardware between programming languages and transistors.

Prerequisites

When Should You Take CS 240?

Prerequisite: CS 230 or permission of the instructor is required to enroll in CS 240.

Recommendations:

  • Consider your courseload carefully. CS 240 is a 1.25-credit lab course that requires a larger time commitment and workload than most 1-credit courses.
  • Take CS 240 early after finishing the CS 111 / CS 230 introductory sequence. CS 240 should boost your independence, give valuable context for how things work as you approach further computing studies, and open doors to a wide range of courses and areas in CS.

Please talk to the instructors if you have any questions or concerns. We are happy to work with you to make your time in CS 240 most effective and rewarding for you.

Learning objectives

Goals

Course goals include:

  • To understand how computers execute programs.
  • To understand the roles of key software and hardware abstractions, their implementations, and their relation through translation and representation, including: digital logic, microarchitecture, instruction set architecture, the memory hierarchy, basics of programming language implementations, and operating system abstractions.
  • To understand when and how computer system implementation impacts correctness or performance of arbitrary high-level programs.
  • To become proficient in structured reasoning about the execution of programs on well-defined models, including the use of assertions and debugging tools to inspect program invariants and execution state.
  • To develop foundations for further study of programming language implementation, security, computer architecture, operating systems, networks, concurrent and distributed systems, or other systems/implementation topics in computer science.
  • To develop skills for independent learning, critical thinking, and problem-solving as a self-reliant computer scientist.

Topics

The course home page hosts the working schedule. +Optional extensions are prefixed in the schedule with a plus sign. We may visit these if there is time. They are always available for your own exploration in further depth.

Computational Building Blocks:

  • Hardware computation building blocks:
    • Transistors, digital logic gates
    • Combinational and arithmetic logic
    • Sequential (stateful) logic
    • Overview of computer processor architecture
  • Data representation fundamentals:
    • Data representation with bits, bit-level computation
    • Number representation, arithmetic
    • The memory model, pointers, and arrays in the C language
    • Assertions, debugging

Hardware-Software Interface:

  • The instruction set architecture model, machine code, assembly language, x86
  • Basic program translation
  • Control flow
  • Procedures, call stack
  • Data layout, security implications

Abstractions for Practical Systems:

  • The memory hierarchy, caches
  • Memory allocation
  • Operating system basics:
    • Exception control flow
    • The process model
    • Virtual memory
  • Compilers, run-time systems, programming tools
  • Beyond 240

Textbooks and other notes

Texts

Electronic options are available for all required sources. At least one physical copy of each text is also available in the physical SCI L037 CS Systems Lab **for use within the CS department area.**Please use them in the data lab area and return them to the shelf when you are done.

We use one primary textbook extensively:

Other textbooks are used during the first part of the course:

**We recommend a good reference on the C programming language.**Here are a couple solid options:

Additional materials will be posted directly on the course website.

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

Lecture notes available at Calendar

No videos available

Labs available at Lab

Assignments available at Work

Tools available at Tools

Covered concepts