*This course will be conducted remotely and will be online only for Winter 2021*
This course is all about constructing your own knowledge of computer systems by building a general-purpose computer system from the ground up. The objective is to integrate key ideas from algorithms, computer architecture, operating systems, compilers, and software engineering into one unified framework. Along the way, we'll explore ideas and techniques used in the design of modern hardware and software systems, and discuss major trade-offs and future trends. Throughout this journey, you'll gain lots of cross-section views of the field of computer science, from the bare-bone details of switching circuits to the high-level abstraction of object-based software design. By the end of the course, you will have written a computer game in an object-oriented programming language; compiled that program into machine language using the compiler, the virtual machine language translator, and the assembler that you wrote; and run your program on (virtual) hardware that you designed.
Course Contents and Coursework
Week 1 (chapters 1-2 of the text)
- Topics: Boolean logic, combinatorical chip design, Karnaugh maps, hardware description language
- Coursework: Use a hardware description language to build a basic chip set.
Week 2 (chapter 3 of the text)
- Topics: Sequential chip design, binary arithmetic
- Coursework: Use a hardware description language to build a sequential chip set and the ALU, CPU, memory for a computer.
Week 3 (chapters 4-5 of the text)
- Topics: Machine language, computer architecture
- Coursework: Write and run programs in assembly language; use a hardware description language to build a working computer.
Week 4 (chapter 6 of the text)
- Topics: Assemblers
- Coursework: Test 1 (in class). Design, implement, test, and debug an assembler, using a programming language of your choice.
Week 5 (chapter 7 of the text)
- Topics: Virtual machine paradigm, stack arithmetic
- Coursework: Design, implement, test, and debug a virtual machine translator for stack arithmetic and memory access commands, using a programming language of your choice.
Week 6 (chapter 8 of the text)
- Topics: Virtual machine language program control
- Coursework: Add function definition, and function call and return commands to the virtual machine translator.
Week 7 (chapter 9 of the text) (chapter 10 of the text)
- Topics: Overview of high-level object-oriented programming languages
- Coursework: Test 2 (in class). Write a small sample program in the high-level object-oriented programming language used in this course.
Week 8 (chapter 10 of the text)
- Topics: Compilers, syntax analysis
- Coursework: Design, implement, test, and debug a tokenizer and parser for an object-oriented language compiler, using a programming language of your choice.
Week 9 (chapters 11-12 of the text)
- Topics: Compilers, code generation, Operating systems
- Coursework: Design, implement, test, and debug a code generator for an object-oriented language compiler, using a programming language of your choice.
- Coursework: Test 3 (in class)
This course uses the text "The Elements of Computing Systems; Building a Modern Computer from First Principles" by Noam Nisan and Shimon Schocken, and follows the "From Nand to Tetris" curriculum laid out on the web sitewww.nand2tetris.org. It's highly recommended that you bring a laptop to class each week.