Live data from Hacker News

From Nand to Tetris: Building a Modern Computer from First Principles

nand2tetris.org

41–49 of 49 posts

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#41
post #24

Earlier quoted context omitted.

During my intro to computer engineering course, lectures touched on why NAND gates, and the conclusion was that you can build anything you need in a basic computer using NAND gates. It boils down to expense. A BOM (bill of materials) with fewer line items tends to be cheaper. This doesn't really hold in today's world of silicon prints, but at the start I think it was price that drove the decision.

Actually if you take an XOR gate with a naive translation into NAND gates you would use 20 transistors, but if you don't need a large fan out from the output you can actually do it with 6 transistors using a pass gate layout (which is neither NAND nor NOR). So typically you don't use NAND vs NOR because of transistor count.

Oh! Good to know. Thank you!

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#42
post #10

I made a small game inspired by the first lessons in the course: http://nandgame.com/

If I make a XOR circuit with 4 NAND gates it says I can do better. My 3 gate solution is to use an AND, OR, and NAND gate which would have been 6 NAND gates. However it gives me full marks for my 3 gate solution.

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#43
post #42
post #10

I made a small game inspired by the first lessons in the course: http://nandgame.com/

If I make a XOR circuit with 4 NAND gates it says I can do better. My 3 gate solution is to use an AND, OR, and NAND gate which would have been 6 NAND gates. However it gives me full marks for my 3 gate solution.

Yeah it currently only compares the solutions towards the minimum number of components of any type. I also intend to compare against the minimum number of nand gates overall, but this is not yet supported.

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#44

If you would like to start at a slightly lower level, Charles Petzold has written a great book on the subject: https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

Using everyday objects and familiar language systems such as Braille and Morse code, author Charles Petzold weaves an illuminating narrative for anyone who’s ever wondered about the secret inner life of computers and other smart machines. ... cleverly illustrated and eminently comprehensible story ... No matter what your level of technical savvy, CODE will charm you—and perhaps even awaken the technophile within. Cod…

Code goes into how logic gates like the nand gate are built, so it does start at a lower level than Nand to Tetris which start with nand gates as primitives.

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#45
post #10

I made a small game inspired by the first lessons in the course: http://nandgame.com/

This is really awesome.. I too love the book Code by Petzold. I was wondering if I could help translate this into German? I have some work colleagues that could really benefit, but I think it would be easier if the explanatory text was German.

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#46

If you would like to start at a slightly lower level, Charles Petzold has written a great book on the subject: https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

Using everyday objects and familiar language systems such as Braille and Morse code, author Charles Petzold weaves an illuminating narrative for anyone who’s ever wondered about the secret inner life of computers and other smart machines. ... cleverly illustrated and eminently comprehensible story ... No matter what your level of technical savvy, CODE will charm you—and perhaps even awaken the technophile within. Cod…

I think you and the GP are using "lower level" in different ways. GP means with a lower barrier to entry, you mean "closer to the electrons" if I understand both of you correctly.

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#47
post #4

I just completed part 1 building a computer from gates and writing an assembler and am in the middle of part 2 where you develop compilers and a stack based virtual machine. For someone like me who did not study computer science but has been a self taught programmer in the Analytics spacefor over a decade, this has been a tremendously useful and accessible introduction to basic CS concepts and very eye opening in ter…

> I wonder if there are similar courses on CS algorithms for people who didn't study CS in college. This might be a bit more challenging and less hand holding than the nand2tetris course but if you are up for it, why not go with the best? Sedgewick Algorithm book has been one of the standard algorithm books in universities for a long time. https://algs4.cs.princeton.edu/home/ https://www.coursera.org/learn/algorithms…

Question: Why not CLRS instead of Sedgewick's book/course?

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#48
post #36

Earlier quoted context omitted.

https://en.wikipedia.org/wiki/Ring_oscillator You can use NAND to make NOT.

That's quite unexpected. Thanks.

If that's unexpected then I really find it hard to take your earlier comments serious.

Re: From Nand to Tetris: Building a Modern Computer from First Principles

#49
post #45
post #10

I made a small game inspired by the first lessons in the course: http://nandgame.com/

This is really awesome.. I too love the book Code by Petzold. I was wondering if I could help translate this into German? I have some work colleagues that could really benefit, but I think it would be easier if the explanatory text was German.

That would be really cool. I need to refactor a bit to allow different translations of the text, but I can get back to you when it is possible.
Post reply on HN