Coursera: Nand2Tetris
课程简介
- 所属大学:希伯来大学
- 先修要求:无
- 编程语言:任选一个编程语言
- 课程难度:🌟🌟🌟
- 预计学时:40 小时
Coursera 上被数万人评为满分,在全球四百多所高校、高中被采用,让一个完全没有计算机基础的人从与非门开始造一台计算机,并在上面运行俄罗斯方块小游戏。
听起来就很酷对不对?实现起来更酷!这门课分为硬件和软件两个部分。在硬件部分,你将进入 01 的世界,用与非门构造出逻辑电路,并逐步搭建出一个 CPU 来运行一套课程作者定义的简易汇编代码。在软件部分,你将编写一个编译器,将作者开发的一个名为Jack的高级语言编译为可以运行在虚拟机上的字节码,然后进一步翻译为汇编代码。你还将开发一个简易的 OS,让你的计算机支持输入输出图形界面。至此,你可以用 Jack 开发一个俄罗斯方块的小游戏,将它编译为汇编代码,运行在你用与非门搭建出的 CPU 上,通过你开发的 OS 进行交互。学完这门课程,你将对整个计算机的体系结构有一个全局且深刻的理解,对于你后续课程的学习有着莫大的帮助。
你也许会担心课程会不会很难,但这门课面向的人群是完全没有计算机基础的人,课程作者的目标是让高中生都能理解。因此,只要你按部就班跟着课程规划走,一个月内学完应该绰绰有余。麻雀虽小但是五脏俱全,这门课很好地提取出了计算机的本质,而不过多地陷于现代计算机为了性能而设计出的众多复杂细节。让学习者能在轻松愉快的学习体验中感受计算机的优雅与神奇。
课程资源
- 课程网站:Nand2Tetris I, Nand2Tetris II
- 课程视频:详见课程网站
- 课程教材:计算机系统要素:从零开始构建现代计算机
- 课程作业:10 个 Project 带你造台计算机,具体要求详见课程网站
资源汇总
@PKUFlyingPig 在学习这门课中用到的所有资源和作业实现都汇总在 PKUFlyingPig/NandToTetris - GitHub 中。
Coursera: Nand2Tetris
Descriptions
- Offered by: Hebrew University of Jerusalem
- Prerequisites: None
- Programming Languages: Chosen by the course taker
- Difficulty: 🌟🌟🌟
- Class Hour: 40 hours
As one of the most popular courses on Coursera, tens of thousands of people give it a full score, and over four hundred colleges and high schools teach it. It guides the students who may have no preparatory knowledge in computer science to build a whole computer from Nand logic gates and finally run the Tetris game on it.
Sounds cool, right? It's even cooler when you implement it!
The course is divided into hardware modules and software modules respectively.
In the hardware modules, you will dive into a world based on 0 and 1, create various logic gates from Nand gates, and construct a CPU step by step to run a simplified instruction set designed by the course instructors.
In the software modules, you will first write a compiler to compile a high-level language Jack which is designed by the instructors into byte codes that can run on virtual machines. Then you will further translate the byte codes into assembly language that can run on the CPU you create in the hardware modules. You will also develop a simple operating system that enables your computer to support GUI.
Finally, you can use Jack to create the Tetris game, compile it into assembly language, run it on your self-made CPU, and interact with it through the OS built by yourself. After taking this course, you will have a comprehensive and profound understanding of the entire computer architecture, which might be extremely helpful to your subsequent learning.
You may think that the course is too difficult. Don't worry, because it is completely designed for laymen. In the instructors' expectations, even high school students can understand the content. So as long as you keep pace with the syllabus, you can finish it within a month.
This course extracts the essence of computers while omitting the tedious and complex details in modern computer systems that are designed for efficiency and performance. Surely you will enjoy the elegance and magic of computers in a relaxing and jolly journey.
Course Resources
- Course Website:Nand2Tetris I, Nand2Tetris II
- Recordings:Refer to course website
- Textbook: The Elements of Computing Systems: Building a Modern Computer from First Principles (CN-zh version)
- Assignments:10 projects to construct a computer, refer to course website for more details
Personal Resources
All the resources and assignments used by @PKUFlyingPig are maintained in PKUFlyingPig/NandToTetris - GitHub.