Course overview

Foundations of Computing Systems

How humans made computation possible, from electrical signals and circuits to memory, machine language, and a working computer.

The lectures develop the underlying ideas; the laboratory turns those ideas into hardware components that students build and test.

View lectures

At a glance

Course information

Class schedule, assessment, and the principal textbook.

Timings and location

Monday
11:00 am-noon, A01-102
Wednesday
9:00-10:00 am, A01-102
Thursday
8:00-9:00 am, A01-102
Laboratory
Thursday, 2:00-5:00 pm, A01-109

Evaluation

CS2011 Theory

Test 1: 25% · Test 2: 25% · End-semester examination: 50%

CS2111 Laboratory

Lab work: 10% · Test 1: 25% · Test 2: 25% · End-semester examination: 40%

Each lab carries 1%; the best 10 of 11 labs are counted.

Textbook

Noam Nisan and Shimon Schocken, The Elements of Computing Systems: Building a Modern Computer from First Principles, The MIT Press.

Nand2Tetris course website

Slides

Lectures

Use the arrow keys or the on-screen controls to move through a lecture.

Week 1

The Story

Course orientation and the human story behind chips and computation.

Course orientation

Lecture 0: Course Details

Expectations, timings, evaluation, and laboratory details.

Open slides
Week 2

Boolean Logic

From Boolean functions to gates, Hardware Description Language, and design practice.

Introduction

Lecture 2: Boolean Algebra

Boolean variables and functions, truth tables, expressions, and canonical representation.

Open slides
Gates and HDL

Lecture 3: Gate Logic and Hardware Description Language

Logic gates, composite gates, gate specifications, and HDL.

Open slides
Laws and tutorial

Lecture 4: Boolean Laws and Logic Design Tutorial

Boolean laws, expression simplification, truth-table verification, gate diagrams, and HDL practice.

Open slides
Laboratory

Lab 1: Basic Gates

Implement Not, And, Or, Mux, DMux, And16, Mux16, Or8Way, Mux4Way16, and DMux4Way using Nand or any previously built gates.

Open web IDE
Week 3

Boolean Arithmetic

Binary representation, arithmetic circuits, and the Arithmetic Logic Unit.

Introduction

Lecture 5: Boolean Arithmetic

Binary numbers, word size, addition, and signed integers using two's complement.

Open slides
Adders and ALU

Lecture 6: Building Adders

HalfAdder, FullAdder, Add16, Inc16, and the path from bit addition to an Arithmetic Logic Unit.

Open slides
ALU and tutorial

Lecture 7: Arithmetic Logic Unit (ALU)

Control bits, the ALU specification, its eighteen functions, implementation planning, and tutorial exercises.

Open slides
Laboratory

Lab 2: Adders and ALU

Implement HalfAdder, FullAdder, Add16, Inc16, and ALU using only the chips gradually built in this lab and chips from the previous week.

Open web IDE
Week 4

Sequential Logic

From time and state to registers, memory banks, and the Program Counter.

Time and registers

Lecture 8: Time, State, and Registers

Clock cycles, Data Flip-Flops, controlled feedback, Bit, and the 16-bit Register.

Open slides
Memory hierarchy

Lecture 9: Random Access Memory

Addresses, read and write timing, RAM8, and recursive construction through RAM16K.

Open slides
Counter and tutorial

Lecture 10: Program Counter

Control priority, PC construction, sequential simulation, and Chapter 3 design exercises.

Open slides
Laboratory

Lab 3: Sequential Logic

Implement Bit, Register, RAM8, RAM64, RAM512, RAM4K, RAM16K, and PC using DFF and previously built chips.

Open web IDE
Week 5

Machine Language

From machine-language abstractions and addressing modes to Hack computation, programs, branching, symbols, and memory-mapped input/output.

Machine language

Lecture 11: Machine Language

Memory, processors, registers, command families, addressing modes, and an introduction to Hack's memory spaces, A, D, M, and unconditional goto.

Open slides
Hack instructions

Lecture 12: Hack Machine Language

A- and C-instructions, computation, destination and jump fields, assembly symbols, and memory-mapped screen and keyboard access.

Open slides
Laboratory

Lab 4: Hack Machine Language

Write and test Mult.asm and Fill.asm using the assembler and CPU emulator.

View lab question

Thirteen weeks

The journey

Each layer will be built from parts created in the layer below it.

  1. Boolean logicGates, HDL
  2. ArithmeticBinary numbers, Adders, ALU
  3. MemoryRegisters, RAM, sequential logic
  4. Machine languageInstructions, assembly, I/O
  5. Computer architectureCPU, memory, stored programs
  6. Systems perspectiveHow software meets the machine