I've done the Coursera course, Nand2Tetris, that inspired this website [1] and found it deeply intellectually satisfying and engaging.<p>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!<p>-----------<p>[1] <a href="https://www.nand2tetris.org/" rel="nofollow">https://www.nand2tetris.org/</a>
Building circuits is neat, but I think this has some problems as a game:<p>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.<p>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 one as the number of gates that you used, or the number of gates that is optimal, or what? Someone else told me it was the latter, but it seems like XOR counts as 6 even though there's apparently a way to do it with fewer?<p>3. Why do some levels give me the message "This is optimal!" while others say "This is the simplest solution!"? What's going on here? What do these messages mean specifically? It's not clear.<p>All this adds up making attempts at optimization a bit frustrating and as such I just don't really want to play it very far. If you're not worried about optimization it seems fine, but if you are the interface really kind of works against you.
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.<p>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 draw the equivalent circuit out with just nand gates and assume they all have some delay between input and output, you'll see why).<p>A safer solution would be to cross couple two nand gates into an SR latch [0], use another two nand gates to control the Set and Reset signals, and an inverter to create NOT(data).<p>Of course in reality, a latch is usually custom built out of transistors rather than logic gates, but there are some cases where I've used logic-gate-latches to make things easier.<p></pedanticism><p>[0] <a href="http://electronics-course.com/sr-nand-latch" rel="nofollow">http://electronics-course.com/sr-nand-latch</a>
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).
I 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: <a href="https://en.wikipedia.org/wiki/Flip-flop_(electronics)#D_flip-flop" rel="nofollow">https://en.wikipedia.org/wiki/Flip-flop_(electronics)#D_flip...</a><p>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 latches) that one would normally use. My best attempt at coming up with an explanation is that it's like two-phase edge-triggered logic.
I got excited when I saw the title, then checked the URL and it is a software simulation / game of building a computer. I'm not denying this can be interesting, but I've been thinking for a while to get my hands dirty with hardware as a side project. (I'm a software eng by profession). I haven't really done a lot of research on this yet, but does anyone have any recommended guides/books/tutorials on how to get started designing and building my own computer? (extra points it it's a mobile/embedded computer)
Neat! My only complaint is I feel like it would be more intuitive to be able to drag connections from output to input. I understand why it's the other way around (each input can only have one source, while outputs can go to multiple chips) but it still feels backwards - like reading right to left.
If you like this or want to get into it a bit more, this recent video is lovely <a href="https://www.youtube.com/watch?v=QZwneRb-zqA" rel="nofollow">https://www.youtube.com/watch?v=QZwneRb-zqA</a>
Very cool! Reminds me of all the fun I had with Rocky's Boots on Apple II:<p><a href="https://en.wikipedia.org/wiki/Rocky%27s_Boots" rel="nofollow">https://en.wikipedia.org/wiki/Rocky%27s_Boots</a>
This looks a bit like MHRD [1] but with a GUI :)<p>----<p>[1] <a href="https://store.steampowered.com/app/576030/MHRD/" rel="nofollow">https://store.steampowered.com/app/576030/MHRD/</a>
Awesome! I've always thought it would be interesting to port Nand2Tetris to the web to make it more easily accessible. Glad someone finally ported the virtual computer building part!
I was able to get as far as building the half-adder, but then didn't have the means of figuring out the full adder as that seemed massively more complex.
I have fond memories from reading this book and doing the exercises. I never got past building RAM memory though :-)<p>It's worth mentioning that the book is getting a extensively revised (sic) 2nd edition in July 2021.<p>* <a href="https://www.amazon.com/Elements-Computing-Systems-second-Principles/dp/0262539802" rel="nofollow">https://www.amazon.com/Elements-Computing-Systems-second-Pri...</a>
I find using an FPGA for this an ideal middle point. Building a functional computer from discrete components is fun but the result may not be worth the effort, to be honest. At the other extreme, modeling it in software may leave a weird feeling of not having achieved anything. With an FPGA, on the other hand, you can create something of a usable computer, even one you could run Linux on.
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?<p>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.<p>In any case, this is fun :)
For anyone interested, also check out this computer designed in Powder Toy game!
<a href="https://www.youtube.com/watch?v=h4eHgnLFk9k" rel="nofollow">https://www.youtube.com/watch?v=h4eHgnLFk9k</a>
That's the coolest thing I have seen today. Thanks! :)<p>Suggestion: replace the blue button text ("I have completed the level") with something simpler, like "Run", "Check", "Test" or "Go".
Some of my favourite courses of undergrad were Digital Electronics 1 and 2. How you can build everything up from nand gates is so satisfying, I’ve forgotten much of it now but this is bookmarked to come back to for posterity
It probably sounds petty, but I found it disturbing that inputs are at the bottom ... I was constantly having to readjust my thinking, and have become sufficiently frustrated to give up.
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?
Reminds me of Ben Eater's Youtube videos where he builds everything using basic gates on a breadboard. He made a video-card using ICs on a breadboard that fascinated me: <a href="https://www.youtube.com/watch?v=l7rce6IQDWs" rel="nofollow">https://www.youtube.com/watch?v=l7rce6IQDWs</a>
Love this - I actually started implementing these circuits in C [0] a while back but never got past combined memory.<p>[0]: <a href="https://news.ycombinator.com/item?id=23672470" rel="nofollow">https://news.ycombinator.com/item?id=23672470</a>
A quite similar game in Steam:<p>MHRD<p><a href="https://store.steampowered.com/app/576030/MHRD/" rel="nofollow">https://store.steampowered.com/app/576030/MHRD/</a>
this is fun. When I got to the multi-bit-adder I think the half adder was removed from the toolbox though and replaced with the full adder - would be nice to keep it there.
it would be cool (ambitious) if at some point there is also a programming language/compiler down the line. perhaps it can would also be able to run tetris or even another nandgame.
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