Hacker News new | ask | show | jobs
by nickpsecurity 3695 days ago
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...
1 comments

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).

We've forgotten how hard of a problem RAM used to be, and how far into the Rube Goldberg we went to solve it.

Things We Actually Did:

Mercury delay lines were tubes full of mercury we sent vibrations through. Those vibrations would reflect around and get detected and read out later. This wasn't, technically, random-access, but it was memory.

Williams-Kilburn tubes were CRTs with long-persistence phosphor, the exact opposite of what display CRTs used, and metal plates on the front to allow the contents of memory to be read out. You could have two identical CRTs, one with the plate to use as RAM and one built into the display panel so the operators could see the contents of RAM in real time.

Core memory was tiny little ceramic ferrite doughnuts woven into complicated metal grids which would change how they were magnetized in response to a sufficient current; their state could be read back out non-destructively, and core was, in fact, nonvolatile. The core modules were woven by hand by women working with microscopes and very steady hands.

Being able to make usable amounts of memory out of components we can just etch into silicon was an amazing advance. Nothing short of revolutionary, really; computers as we know them would be flatly impossible without cheap, plentiful RAM.

There's a few of us here combing through the old stuff to see all that old wisdom and tricks. So many clever things. I saw the mercury computers researching old systems of my arch-nemesis, the NSA. The document joked that buffer overflows were a serious problem on those. No shit lol!

The rope memory I read about studying Apollo and Margaret Hamilton's work. Core I saw a bit of watching videos of Burroughs computers, my favorite, being assembled in factories. It was actually kind of mesmerizing watching that old stuff because you can see all the brilliance and intricacies of the device. Today, it's all hidden behind plastic for anyone except labs (eg ChipWorks) that can pull it out. People say, "Why would I pay (obscene amount here) dollars for this little piece of plastic?" One thing I do is show them pictures of old computers without covers saying "It's basically that... with 10x more components... squeezed into that tiny space. What, did you think squeezing a room full of wiring and components into a tiny space cost a few bucks?"

"I'll give it a shot :)"

I admire your initiative. :)

"logic cells: easy, by universality of NAND."

Got me dead to rights there. Seems to be able to do anything boolean.

"a massive (or not so much) array of flip flops"

http://www.learningaboutelectronics.com/Articles/D-flip-flop...

Close but still need the resistors.

"May I suggest a"

That's not a NAND gate but it's pretty neat. Thanks for that link. Especially as when you posted it I was, in search of esoteric constructions, just discovering and looking at these diode-based works:

https://en.wikipedia.org/wiki/Diode_logic

https://en.wikipedia.org/wiki/D-17B

Note: D-17B is pretty wild in design, appearance, tech, and reliability all at once. Makes me want to try it on 0.35 micron in voter part of lockstep or TMR circuits. :)

"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."

Now you're stretching. NAND doing signal conditioning, power regulation, or 2-3 component differential equations is hard to believe. I'm thinking it fails here. I admit I cheated by including an analog requirement but it exists in ever real-world computer (esp SoC) so it seemed fair-ish.

Overall, a high-scoring counterpoint that taught me some useful stuff about NAND gates and old-school ROM. I'm researching both reductionism and old-school techniques in anti-subversion hardware. So, quite relevant. Thanks!

Those resistors are not part of the flop, they're just there to limit current through the LEDs to make the state visible. See here for a D flip flop: https://en.wikipedia.org/wiki/Flip-flop_(electronics)#/media....

My point was about Vcc and ground was just meant as a response to the "power-related analog components". If you don't already have a regulated power rail even a single NAND gate won't be able to do it's thing, so its definitely a requirement but if you say you are allowed a functional NAND gate you must be allowed power rails as part of that.

I'll be darned. So, NAND gets some extra points on the flip flop. Far as analog, even if I ignored power rail we still have ADC's, DAC's, etc. This time I hesitate as I say I doubt they'll be implemented just with NAND gates.