MHRD
NandGame – Build a Computer from Scratch
131–140 of 141 posts
Re: NandGame – Build a Computer from Scratch
#132Building 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.
Yeah if you see my comment below I think really it should always be explicit both about whether you used the fewest components and (separately) about whether you used the fewest NAND gates. Currently it seems like you sometimes only get told about one or the other...
Re: NandGame – Build a Computer from Scratch
#133Should 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
Re: NandGame – Build a Computer from Scratch
#134This 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
#135Should 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
Author here - I would love to do a few layers below the nand gate.
A CMOS game, drawing the various layers that make up transistors, would be interesting to see.
Re: NandGame – Build a Computer from Scratch
#136I know digital logic, yet was perplexed by the odd definition of D flip-flop this game uses with both "store" and "clock" inputs, which matches none of the standard variants of DFFs: https://en.wikipedia.org/wiki/Flip-flop_(electronics)#D_flip... Edit: this continues on with the counter level, where you can use the register but it does not behave like the typical set of edge-triggered flip-flops (or transparent latch…
Yeah. The flip flop, and its corresponding register version would be a DFF with enable pin. That is not actually too abnormal. The traditional implementation is taking a normal DFF and adding the enable feature either by gating the clock or by adding a mux in the input path, that uses the enable signal to select between the input or the existing output.
Re: NandGame – Build a Computer from Scratch
#137This 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
#138Earlier quoted context omitted.
Author here - It uses TypeScript and the Angular framework. Not because I prefer Angular in particular but because I had to learn it anyway for a work-related project. I think TypeScript is great.
It looks like it is more canvas than svg, yes? Was there a particular canvas library that you used? I ask because I'm working on a side project that feels like it mostly pulls me in an svg direction, so I'm been prototyping with dagrejs and cytoscape.js, but it also has elements of creating (or dragging, like yours) new elements into a graph and connecting them, so I'm regularly torn when deciding on the basic archit…
I would definitely like to improve the look of the wires.
Re: NandGame – Build a Computer from Scratch
#139Earlier quoted context omitted.
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
#140What might be some logical next steps to do, learn, or make (preferred) after learning some basic circuit logic?
Building 8 bit computer from scratch? Ben Eater has amazing way to teach and walk you trough it. https://eater.net/8bit