Friday, March 29

Nand2Tetris

 ==>


A while back, I had a conversation with an old roommate on the topic of computer science. He mentioned that one of the better ways to become familiar with the application of computer science was to actually build one from scratch. At the time, I thought that sounded like a fun, but daunting and time-consuming task; time that might be better spent on some specialization. I realized that there was a hierarchy of unique and challenging topics between hardware and software in a modern personal computer and that a lifetime could be spent mastering any particular aspect of those. At the same time, if some resource existed that could help an individual navigate through that hierarchy, the practical knowledge could be acquired without the expensive and painstaking mastery necessary for the corporeal implementation of a computer.

Last December, I was lucky enough to come across Nand2Tetris - the very resource that I idly dreamt of. The Nand2Tetris coursework does exactly as the name describes: the student is given materials that allow them to build and simulate logic circuits and, starting with a simple NAND gate, the student implements all of the components necessary to perform the operations involved in a game of Tetris. The organization of the class is impressively clean. There are multiple simulators spanning a variety of stages in the process which represent checkpoints in the course: Hardware Simulator, CPU Emulator, VM Emulator, Assembler, Compiler, Operating system; each of these are first implemented by the student and then utilized (for the sake of speed) as the succeeding topic is breached. In that way, the student never utilizes components that weren't  (in spirit) originally constructed by them - everything ties back to the original NAND gate. What follows is a user-friendly, intuitive, and educational series of tasks that simulate the main points of implementing a computer achitecture from scratch while retaining the continuity of the experience and filtering out any potential headaches due to inefficiency of the hardware simulation (at the scale necessary for building a working computer).


Whats more, the materials are open to the public: the simulation software, assignments, and half of the book. I was able to work through the first 6 chapters without paying a cent and learned a great deal about the practical and necessary constraints on machine language, assembly code, and virtual machine. Working through these exercises has given me a more detailed perspective of the landscape of computer science and its application. For a mechanical engineer who is interested in mechatronics systems or computer architectures, this course is an absolute blessing. I've purchased the book and plan on finishing the last 6 chapters in the coming weeks.



Even if a person was constrained by time and unable to perform the exercises, the book itself is worth reading. Topics are presented with little assumptions of prerequisite knowledge. In fact, this material could be (and I believe is) taught in highschools and middle schools to great effect. Overall, I am very pleased with this course and greatly appreciate the work of Noam Nisan, Shimon Schocken, and the rest of the Nand2Tetris team for preparing it.

No comments:

Post a Comment