Live data from Hacker News

NandGame – Build a Computer from Scratch

nandgame.com

81–90 of 141 posts

Re: NandGame – Build a Computer from Scratch

#81
post #2

I've done the Coursera course, Nand2Tetris, that inspired this website [1] and found it deeply intellectually satisfying and engaging. If anyone is interested in learning about the logical primitives that build up to a computer, and how they're implemented using logic gates, I would deeply recommend the course! ----------- [1] https://www.nand2tetris.org/

This is an incredible course to learn about low level stuff like computer architecture, micro OP codes, machine language, assembly code, virtual machine...

I implemented the course[1] in Logism[2] but unfortunately the simulation is too slow to run Teris!

[1] https://github.com/trungdq88/16-bit-computer

[2] https://sourceforge.net/projects/circuit/

Re: NandGame – Build a Computer from Scratch

#82
post #63

Not that this will ever matter for someone who isn't a circuit designer, but the "optimal" solution for the latch is actually really bad. If you use a "select" block (which should really be called "mux") and tie the output to the input, you create a race condition. If the data input is 1, and you change set from 1 to 0, the output can actually glitch to 0 for a very short period of time, which is a big no-no. (If you…

in the yearly reposting of this on hn i always am annoyed to remember some of the best-on-paper isms of the book

Re: NandGame – Build a Computer from Scratch

#83
post #77
post #34

Should start from physics building up and up until you have subatomic particles, rising through many layers of abstraction until you are doping P and N type semiconductors .... starting with such a high level concept as “nand gates” is far too easy. /sarcasm.parody

this would be good material for a book, where in the end, the reader gets to output "hello world".

Ok I’ve added it to my list of possible book ideas. But it’s already a list that’s grown far beyond a lifetime’s output.

(“From Higgs Boson to Hello World” as working title.)

Re: NandGame – Build a Computer from Scratch

#85
So I'm a bit confused with how this is measuring the number of NANDs; for example, with the first adder problem, I solved it with exactly two gates, neither of which were NAND, and yet while it's recognized as the lowest number of gates, it insists that it can be done with fewer NANDs (than zero, apparently). Is it counting the NANDs that may or may not be used to implement those two gates? And if so, is that based on how I solved the previous problems? Or is it based on the lowest possible number of NANDs that would be required to solve those problems / produce those gates?

If it is indeed counting the NANDs used to make the gates I actually used, it'd be useful to have a clear indication of exactly how many NANDs each gate uses so I can chase after a game of NAND Golf.

In any case, this is fun :)

Re: NandGame – Build a Computer from Scratch

#87

So I'm a bit confused with how this is measuring the number of NANDs; for example, with the first adder problem, I solved it with exactly two gates, neither of which were NAND, and yet while it's recognized as the lowest number of gates, it insists that it can be done with fewer NANDs (than zero, apparently). Is it counting the NANDs that may or may not be used to implement those two gates? And if so, is that based o…

> If it is indeed counting the NANDs used to make the gates I actually used

This

> it'd be useful to have a clear indication of exactly how many NANDs each gate uses

You learned that as part of your first section exercises.

At the end of the day everything is made of NAND gates. That’s what the first section teaches you.

Re: NandGame – Build a Computer from Scratch

#90
post #9

There was this ancient Flash game called "Engineer of the People" that was all about designing IC circuits (NPN and PNP junctions) in the Soviet Union for some secretive reason. I never beat the game and got to the reveal. IIRC it was by Zachtronics, the same guy that did Shenzhen I/O and infiniminer (the inspiration for Minecraft).

Human Resource Machine and 7 Billion Humans are also pretty good computer programming puzzle games that are pretty funny and fun to play. HRM is basically solving problems using single threaded assembly. 7BH is solving problems using more multi threaded primitives (CSP-like). Both have a couple optimizations points for every problem, and you can copy/paste code to a notepad to save too I believe, though only one solution is saved in game.

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

https://en.wikipedia.org/wiki/7_Billion_Humans

Post reply on HN