Show HN: I made a programmable computer from NAND gates

ArchAndStarch | 420 points

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 (https://eater.net/)

rpmw | a year ago

I could make a few college classes out of this. Well done material.

kristopolous | a year ago

Great work! You have seen the levels of abstraction that most programmers won't throughout their careers.

farhanhubble | a year ago

Fantastic work. NAND to Tetris helped me land my first job out of college.

2OEH8eoCRo0 | a year ago

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 | a year ago

This is amazing work. I wanted to build something similar (virtual) while I was taking the Nand2Tetris course. I'm so impressed that you actually did it. You must have a really good understanding of how computers work now.

ryeguy_24 | a year ago

This is excellent work! I recently started Nand2Tetris myself, and hope to finish part 1 (the HW part of the course) sometime in the next few months. I blogged about my progress here: https://gurudas.dev/blog/2024/04/13/nand-to-tetris-2024-proj...

bhasi | a year ago

Liar. You used NAND gates and a clock.

IncreasePosts | a year ago

Awesome work! Bookmarked for in-depth perusal later. As a fan of NAND-to-Tetris, but never made it all the way through, I look forward to poking around in your project.

mikestew | a year ago

Curious, how many NAND gates are there in total?

gmiller123456 | a year ago

Thank you. First principles FTW!

apienx | a year ago

Seymour Cray would have loved this. Some of his computers were all NAND gates.

Animats | a year ago

Can anybody recommend challenges similar to this one?

greenavocado | a year ago

The readme is so detailed. God job.

BooleanMaestro | a year ago
alanjay | a year ago

Incredible achievement! Good job.

greenavocado | a year ago

On one hand cool project, on the other - e-waste, unless made of recycled ics.

SomeoneFromCA | a year ago

Nice job. Now we should program it in subleq2[0] :D

[0] https://en.wikipedia.org/wiki/One-instruction_set_computer

theanonymousone | a year ago

this is fantastic! great work...

fire_ball | a year ago

NAND is popular probably because of nand2tetris, but it's worth mentioning that NOR is also a universal gate; and many early computers like the https://en.wikipedia.org/wiki/Apollo_Guidance_Computer#Logic... were entirely made of NOR gates.

userbinator | a year ago

Turing Complete[0] is a fun game similar to this where you create your own computer from NAND gates, including your own assembly language.

[0] https://store.steampowered.com/app/1444480/Turing_Complete/

bramhaag | a year ago

Wow, seriously impressive. And the fact that this is the work of basically a high-schooler.

I fear for the kind of competition my kids will have just to make it to college.

elevatedastalt | a year ago

Ground up projects like this are fascinating!

It’s also neat how “ground” has been deepening. It used to mean building mainframe from source. Then building a compiler. Now building from logic gates.

How much deeper can you get? Building a mainframe out of Gödel numbers?

pyuser583 | a year ago

[flagged]

m3kw9 | a year ago

Cool project. It reminds me of a theoretical issue. As the project page says, this system is clearly Turing equivalent. Since it runs software, it even implements a _universal_ Turing machine. But the design uses only (synchronic) sequential logic [1] and Wikipedia seems to suggest that automata theory considers sequential logic only equivalent to finite state machines. Not Turing machines. Isn't that clearly a major bug in automata theory?

My guess is that automata theory consideres it critically important that a "Turing machine" has an infinite tape, while intuitively it instead seems relevant that it has something like a tape at all, some sort of random access memory, even if it is finite. I think such a memory system can't be implemented with classical finite state machines, at least not with comparable time complexity for read and write, but can be realized with sequential logic.

[1] https://en.wikipedia.org/wiki/Sequential_logic

cubefox | a year ago