【Hacker News搬运】展示HN:我用NAND门制作了一台可编程计算机
-
Title: Show HN: I made a programmable computer from NAND gates
展示HN:我用NAND门制作了一台可编程计算机
Text: I am proud to present my solo hobby project NAND. This year-long undertaking follows the completed Nand to Tetris course, but ported to the web with its own runtime, user interface, and IDE. Using the "Load example program" selector, you can try out some programs I wrote on NAND's emulated hardware such as 2048, a genetic algorithm, and a manual stack overflow to corrupt the screen.<p>Check out NAND at <a href="https://nand.arhan.sh" rel="nofollow">https://nand.arhan.sh</a><p>Additionally, I've authored an extensive writeup about the project. Read about it on the GitHub repository's readme.
我很自豪地介绍我的个人爱好项目NAND。这项为期一年的任务遵循了完成的Nand到Tetris课程,但通过自己的运行时、用户界面和IDE移植到了网络上。使用“;加载示例程序“;选择器,你可以试试我在NAND上写的一些程序;s的仿真硬件,如2048、遗传算法和手动堆栈溢出来破坏屏幕<p> 请访问<a href=“https://;/;NAND.arhan.sh”rel=“nofollow”>https://查看NAND/;nand.arhan.sh</a><p>此外;我写了一篇关于这个项目的长篇文章。在GitHub存储库上阅读有关它的信息;的自述。
Url: https://github.com/ArhanChaudhary/NAND
NAND是一个由NAND门完全组成的逻辑模拟器套件,它是一个在网页上模拟的Turing等价的16位计算机。NAND具有自己的CPU、机器代码语言、汇编语言、汇编器、虚拟机语言、虚拟机转换器、编程语言、编译器、集成开发环境(IDE)和用户界面。NAND基于Jack-VM-Hack平台,该平台在Nand to Tetris课程及其相关书籍中有所描述。 NAND的特点包括: - 支持自己的编程语言Jack,这是一种弱类型面向对象的编程语言,语法类似于Java。 - 提供了完整的技术栈,包括内存管理、输入输出、数学函数等。 - 硬件规格包括4KiB的RAM、512x256像素的屏幕、键盘输入、静态类变量和全局栈等。 - 编译器将Jack代码编译成虚拟机代码,然后映射到汇编和机器代码。 - 支持多种编程范式,包括面向对象、过程式、函数式等。 - 提供了一个IDE,用于编写、编译和运行Jack代码。 NAND的设计和实现是一个复杂的工程,它展示了从简单的逻辑门到图灵等价的计算机所需的技术和理论基础。通过学习和使用NAND,开发者可以更深入地理解计算机的工作原理和编程的本质。
Post by: ArchAndStarch
Comments:
rpmw: Wow that is a great side-project, and a great README to boot. I've been meaning on working through Nand to Tetris after playing around some with Ben Eater's 6502 Computer (<a href="https://eater.net/" rel="nofollow">https://eater.net/</a>)
rpmw: 哇,这是一个很棒的附带项目,也是一个很好的自述文件。I-;在与Ben Eater玩了一些游戏后,我一直在努力从Nand到Tetris;s 6502计算机
IncreasePosts: Liar. You used NAND gates <i>and</i> a clock.
IncreasePosts: 说谎者。您使用了NAND门<i>和</i>时钟。
farhanhubble: Great work! You have seen the levels of abstraction that most programmers won't throughout their careers.
farhanhubble: 干得好!您已经看到了大多数程序员赢得的抽象级别;在他们的整个职业生涯中。
not2b: Doing a design for this (specifically, design a microcoded, pipelined RISC processor, from the bottom up, with nothing but NAND gates) was the main problem on the Computer Hardware quals exam at UC Berkeley in the early 1990s. We didn't have to physically build it, though, just produce the detailed design on paper.
not2b: 20世纪90年代初,在加州大学伯克利分校的计算机硬件资格考试中,做这方面的设计(特别是从下到上设计一个微代码、流水线RISC处理器,除了NAND门什么都没有)是主要问题。我们没有;不过,不必进行物理构建,只需在纸上进行详细设计即可。
kristopolous: I could make a few college classes out of this. Well done material.
kristopolous: 我可以用这个上几节大学课。做得好的材料。