Hacker News new | ask | show | jobs
by ntumlin 3696 days ago
Any idea where I could go about learning to do this myself? A few google searches mainly led me to things saying it was impossible.
1 comments

I think you'll like this then: http://www.nand2tetris.org/
It's a wonderful, in fact an astonishing course. I hope that when they come out with part 2, it really does go all the way to Tetris. The "nand" bit is a slight fudge (they actually start you off with both nand and a flip-flop, which is still amazing), but we can grant them a bit of poetic license on that. But not on the Tetris!
I wonder if this had something to do with someone I countered a day or two ago thinking all you needed was a NAND gate to do anything. I said you need memory and some other things for most hardware. Maybe that commenter got the idea from this project's name...
Note that you can in fact create memory with NAND gates. See https://en.wikipedia.org/wiki/Flip-flop_(electronics)#SR_NAN...
Yes, and in one of their Coursera videos the nand2tetris guys sketch out how this works. But I wish they'd have included it in the course itself. Maybe it would have needed an extra chapter, but for those of us who never studied it before it's really cool stuff.
That's neat. Lets test the rest then. Full claim was a computer needed logic cells, RAM, ROM/flash, and analog components (eg I/O & power-related). Still only need a NAND gate? ;)
I'll give it a shot :)

logic cells: easy, by universality of NAND.

RAM: distinction between flip flops and RAM is unnecessary from a strictly technical standpoint. a massive (or not so much) array of flip flops with decoder and mux (also just made of NANDs) can get you by.

ROM/flash: maybe I could argue NAND flash counts as just a NAND gate, but not quite. I'll concede nonvolatile memory with just plain old NANDs. May I suggest a https://en.wikipedia.org/wiki/Diode_matrix?

"analog components": having Vcc and ground available is an implicit requirement of having a functional NAND gate, and IO could just be some wires mirroring a memory location.

Overall I'd say its a largely accurate statement. All you need is something to set up your initial conditions (e.g. program in memory).