Live data from Hacker News

NandGame – Build a Computer from Scratch

nandgame.com

111–120 of 141 posts

Re: NandGame – Build a Computer from Scratch

#112
post #92

Building circuits is neat, but I think this has some problems as a game: 1. It seems to only let you save one solution for each level, even though there are two optimization goals. It should let you save one for fewest components and one for fewest NAND gates. 2. It's not really clear how NAND gate counts work in later levels where you're using potentially non-optimal components you've built? Like does it count each…

Author here - thank you for the feedback! The nand-count is based on how you built the components involved. So optimizing a component will have have cascading effects. "This is the simplest solution!" means the solution with fewest individual components on the canvas. I realize the text could be clearer.

Hi author, cool game, you got me hooked! One thing I could suggest for now (I'm still in the Latch level) is that you could go a bit below and start from the transistor itself, like build the nand gate from the transistors..

Re: NandGame – Build a Computer from Scratch

#113
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

Real men invent the laws of physics from scratch.

Re: NandGame – Build a Computer from Scratch

#114
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

In the style of the famous Carl Sagan's apple pie recipe. "First you create an universe ..

Re: NandGame – Build a Computer from Scratch

#115
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

Not gonna lie, I wanted to do something like this, but then remembered how bad at math and physics I was.

On a random note, I find it disappointed the tiny of amount of physics material on MOOC sites and such.

Re: NandGame – Build a Computer from Scratch

#116
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/

For a more accessible yet also very comprehensive book, see Petzold's Code: http://www.charlespetzold.com/code/

Whenever someone asks me how a computer works, this is what I tell them to read. No need to qualify the recommendation on their background, the book is accessible to anyone because it starts from first principles and builds layers on top.

Re: NandGame – Build a Computer from Scratch

#117
This is fun! But, the first few told me "this is the optimal solution", then I hit the xor gate, and I can get either "this uses the fewest nand gates but it can be done with fewer components" or "this uses the fewest components, but it can be done with fewer nand gates".. Does this imply that there is no optimal solution, or just that I've not yet found it?

Re: NandGame – Build a Computer from Scratch

#119
post #60
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/

Course materials (projects) seem to contain only slides, with bullet points, not real explanations. Am I missing something? Should I buy the book to actually have the course?

You don’t really need the book for the first half of the course, but I found it very helpful for the second half. More so than the vids, which got boring due to repetition.

Re: NandGame – Build a Computer from Scratch

#120
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…

Since the latch is only used as a component of the flip-flip and edge sensitive logic does not care about glitches except on the clock line or any asynchronous set/resets (which are not used in this design) I find that rather unimportant.

Especially because the d-flipflops found in standard cell libraries are frequently implemented as what amounts to two muxes and some inverters.

For a design that uses latches as stand-alone components the glitch considerations become a lot more important.

Post reply on HN