[HN Gopher] NandGame - Build a computer from scratch
___________________________________________________________________
NandGame - Build a computer from scratch
Author : OuterVale
Score : 95 points
Date : 2024-10-30 20:27 UTC (1 days ago)
(HTM) web link (www.nandgame.com)
(TXT) w3m dump (www.nandgame.com)
| michael-online wrote:
| This looks awesome! I never finished working the book and I
| regret it. Can't wait to try even more of this out.
| insane_dreamer wrote:
| Awesome! Will do this with my child.
| dang wrote:
| Related:
|
| _NandGame - Build a Computer from Scratch_ -
| https://news.ycombinator.com/item?id=36862274 - July 2023 (3
| comments)
|
| _NandGame - Build a Computer from Scratch_ -
| https://news.ycombinator.com/item?id=31055307 - April 2022 (14
| comments)
|
| _NandGame - Build a Computer from Scratch_ -
| https://news.ycombinator.com/item?id=25282507 - Dec 2020 (136
| comments)
|
| _Show HN: Online challenge: Build a CPU from scratch_ -
| https://news.ycombinator.com/item?id=17508151 - July 2018 (60
| comments)
| Patrick_Devine wrote:
| Not sure how I missed this those other times, but I have read
| the book and implemented the computer before. It's a super fun
| exercise.
| ziofill wrote:
| Very nice! Related: https://turingcomplete.game/
| kelnos wrote:
| Ugh, this just reminded me how far I've fallen. I did EE in
| college (>20 years ago), specializing in computer architecture.
| Never did anything with it professionally; I ended up in
| software. I couldn't remember how to do any of these. I managed
| to trial-and-error my way to the half-adder, at least.
| lifeisstillgood wrote:
| I get the reaction but I suggest that your previous work has
| set you up to make decisions "in the right direction" time and
| again.
|
| It's a bit like saying "darn I can never remember which Prime
| Minster passed the corn laws or the name of the guy who started
| refrigerated shipping in the USA.
|
| The point is if we have a grasp of the essential narrative
| (something like "wars require engineering, agricultural
| revolution, Industrial Revolution, history is class warfare"
| that background acts like a magnetic field for all the new
| pieces of information, aligning them correctly.
|
| Anyway, relax, be kinder to yourself.
| kelnos wrote:
| Thanks for that! I think I wrote that comment a little more
| negative-sounding than it was in my head. While I do lament
| skills I've lost and forgotten over the years, I know my EE
| background came in handy when writing software professionally
| for embedded and semi-embedded devices, earlier in my career.
| These days I've moved on to distributed systems, so all that
| low-level knowledge isn't quite as useful as it once was.
| tonetheman wrote:
| I wish there were more hints.
|
| I have done this before in another version of this game but for
| the life of me cannot see how to get to a single output from all
| of the components I have placed on the screen.
|
| It does look cool but without more directions or hints I am done
| for.
| kelnos wrote:
| One option might be to search the web for "nand gate using
| relays". That will give you the answer, which might be a little
| spoilery, but you can try to puzzle out how it works from the
| solution.
|
| I found this[0], which is nice in that it's interactive (you
| can click the inputs to change their values and see how the
| current flows), though I think the visuals are a little harder
| to understand. Would be nicer if it had clearer delineation of
| the relays, and their inputs and outputs labeled with more than
| just their voltages.
|
| [0] https://everycircuit.com/circuit/4954026060021760/relay-
| base...
| chrisbrandow wrote:
| yeah, there's something missing in the instructions regarding
| the first Nand gate. I understand how a NAND Gate is
| constructed but I can't figure out how to combine the outputs
| of the two relays in this tool
| ivanbelenky wrote:
| this is awesome, I recommend everyone to also peek into or play
| MHRD
|
| https://store.steampowered.com/app/576030/MHRD/
| ActorNightly wrote:
| Some food for thought:
|
| Once you complete this (ignoring the first level where you
| actually build a NAND gate) you essentially get very much what
| looks like a Neural Network (since it takes 2 neurons to
| represent a NAND gate), n layers deep, with a lot of zeros in the
| weight matrices, and some storage.
|
| Here is my question: given the input/output semantics at the
| assembly level, is it possible to train a blank neural network to
| look like this? Backprop obviously wouldn't work, but perhaps
| there is some form of directed search one could use?
| iterance wrote:
| Some of the earliest tests of neural networks decades upon
| decades ago were done to prove they could be used to model
| logic gates successfully.
| schoen wrote:
| I did both this and the Nand2Tetris course before realizing that
| they are implementing _the same computer_ -- this is an
| interactive graphical version, while the original Nand2Tetris
| uses a textual HDL where you write down the connections between
| logic gates as text, instead of clicking and dragging to indicate
| them.
|
| I found them both fun and educational, but I thought the NandGame
| was _more_ fun. But it 's good to know about the connections, for
| example because there are more follow-on exercises that you can
| do from Nand2Tetris (working with higher layers of computer
| software) after you complete the NandGame. Or you can just be
| aware that you can talk about the experience and the substance
| with people who have done the other version!
| AlchemistCamp wrote:
| I played a similar game called Turing Complete and really enjoyed
| it! https://store.steampowered.com/app/1444480/Turing_Complete/
|
| It's very similar to the Nand2Tetris book.
| XorNot wrote:
| Dropped 30 hours into Turing Complete before I realised what
| was happening to me. Upgraded the machine to 32 bit
| instructions and wrote documentation of my assembly language
| for it and everything.
|
| Fantastic game even in early release!
___________________________________________________________________
(page generated 2024-10-31 23:00 UTC)