From Nand to Tetris (CS492B)

Fall Semester 2017

Do you really understand how a computer works? After taking this course, you definitely will, because you will build a computer yourself—starting with nothing but individual logic gates, and ending with a fully functional computer that we can program in a high-level language.

Don't worry—you need no VLSI skills and no soldering iron. We will simulate the hardware that we build using a simple hardware description language. It is easy to learn, and you'll be surprised how quickly you'll build a fully functional CPU (and, hopefully, how much fun it is to do so completely from the ground up).

We will need to cover topics from algorithms, computer architecture, operating systems, compilers, and software engineering. You do not need to have taken any of these courses—we will cover everything we need.

Prerequisite: You must know how to program and you should have taken CS206 (Data structures).

Course information

Otfried Cheong Office: E3-1 3434, Phone: 3542.
Teaching assistants



The class meets Wednesday from 16:00 to 17:15 and on Friday from 13:00 to 14:15 in room 111 in building N1. Lectures are given in English.

Grading policy

Students must submit all projects.

The final grade will then be composed as follows (small changes reserved):

  • Projects (30%), Midterm (30%), Final (30%), Participation (10%).

Attendance will be taken in nearly every class. If you miss at most 4 lectures, you receive 10 attendance points. For 5 missed lectures, you receive 9 attendance points, and so on. For 14 or more missed lectures you receive no attendance points.

Going to a conference, workshop, doctor, interview, is no excuse for missing the class — you can use the four free missed classes for this.


There will be a midterm and a final exam.


Here is a rough list of what we will cover in each week of the semester.

Week 1 Introduction
Week 2 Combinational logic
Week 3 Sequential logic
Week 4 Machine language
Week 5 Computer architecture
Week 6 Assembler
Week 7 Virtual machine I
Week 8 Midterm exam
Week 9 Virtual machine II
Week 10 High level language
Week 11 Compiler I
Week 12 Compiler II
Week 13 Operating System I
Week 14 Operating System II
Week 15 Review
Week 16 Final Exam


This term we will be using Piazza for class announcements, discussion, and asking questions.

Here is our Piazza class page.

You are responsible for checking the announcements on our Piazza class page regularly (if you make a Piazza account and enroll for the course, announcements will be mailed to you automatically.)

If you do not understand something, it is important that you ask questions. Piazza allows you to ask questions and get answers from the instructor, the teaching assistants, and your classmates. You can ask questions anonymously, so don't be shy and ask!

Both Korean and English are acceptable on Piazza :-). You make it easier for me if you write in English, but if the TAs can answer your question, then Korean is just fine.

To ask questions, you need to register on Piazza and enroll as a student. To do so, go to the enrollment page. Select "Join as student". You will then need to use your KAIST email address (ending with to create an account.

Textbook and support site

We follow the book The Elements of Computing Systems by Nisan and Schocken (MIT Press, 2005).

The book comes with a web site, which contains PDF files of the first six chapters and all the software we need to go through the projects.

The book will also be on course reserve in the library.


There will be many projects in this course, where you build a small part of your computer, or program some part of its software. You will have between one and three weeks to complete each project. All programming projects are submitted using the electronic submission server. The deadline is at midnight on the evening of the deadline day.