[HN Gopher] The Elements of Computing Systems, Second Edition
___________________________________________________________________
The Elements of Computing Systems, Second Edition
Author : VitalyAnkh
Score : 356 points
Date : 2021-02-05 14:45 UTC (8 hours ago)
(HTM) web link (mitpress.mit.edu)
(TXT) w3m dump (mitpress.mit.edu)
| Jtsummers wrote:
| https://www.nand2tetris.org/
|
| The course is at the above website, in case you want to start
| working through it before this edition is released in July.
| protomikron wrote:
| Does anybody know something about the main differences to the
| first edition? Is it the same HACK computer (and stack, with
| assembler, high-level language, etc.), or did they change that?
|
| The original architecture had some caveats - e.g. no external
| interrupt capability, so IO was implemented using busy polling
| and inspection specific IO-mapped memory regions (I don't blame
| them, as it made the book more concise and you can not cover
| everything) and there has been discussion about a HACK-2 from the
| community, so it would be interesting if somebody knows more.
| bmitc wrote:
| I emailed the authors a while back when I found out about the
| second edition, asking about the differences. They stated that
| the hardware platform and software stack specifications are
| unchanged.
| roperzh wrote:
| The first edition is a _great_ book, I completely recommend the
| first ~4 chapters, after that the ROI is not as good.
|
| Personal opinion: I have found "Computer Systems: A Programmer's
| Perspective" to be a better introduction to the same set of
| topics.
| Jtsummers wrote:
| Different books, different aims. _Elements_ is suitable for
| both self-study and a 2-6 week (depending on time and level of
| students) survey course for high schoolers or college students
| in non-EE /CMPE degree programs. The material is freely
| available (for the 1st edition, I assume the 2nd will be as
| well). The print version is 1/4 the cost of _Computer Systems_
| , which seems to be aimed at college students (to be covered
| over an entire semester) or more experienced programmers for
| self-study.
|
| The neat thing about _Elements_ is that, despite being shallow
| in parts, it provides the full map of the subject with projects
| building on each other. Someone who 's gone through it can more
| easily approach deeper treatments to fill in the details as
| they know where it's going, which also aids in motivation
| (removes the "what's the point" question when faced with
| seemingly esoteric topics).
| crispyalmond wrote:
| Is there any place to purchase a digital copy of this? I want to
| read it, but don't like paper copies. Besides the kindle edition,
| I'm looking for an ePUB or PDF mostly.
| Jtsummers wrote:
| The current edition can be read for free, check the "Projects"
| section, at https://www.nand2tetris.org/course. There is also
| the Kindle version of the current edition.
| crispyalmond wrote:
| This is awesome. Thanks for sharing!
| ottod wrote:
| My girls, then aged 10 and 12, made it through the Coursera ECS
| first course. They are not geniuses, but the material is stellar.
| I helped them in a couple of assignments. They enjoyed it, even
| tough not one of them went the STEM route. They became the smart
| artsy young women that make art and music with computers.
| [deleted]
| [deleted]
| cadr wrote:
| I just want to add to what everyone else here is saying. I
| recommend this book to everyone. Very excited to see how they've
| updated it.
| seibelj wrote:
| This is one of the best books you can read as a software
| engineer. Lessons can be done over weekends and they teach you
| so, so much. I recommend this to everyone when discussing CS
| books. Absolutely incredible work - and concise too.
| Tomte wrote:
| In July.
| airstrike wrote:
| Just pre-ordered the Kindle version
| davidkuhta wrote:
| Sunshine and Friendship.
|
| Computing literature published.
|
| A generation renewed.
| michaelmrose wrote:
| Is there any plan to offer the work in progress as an eBook prior
| to release?
| miobrien wrote:
| Course is available for free on Coursera:
|
| Part 1 - https://www.coursera.org/learn/build-a-computer
| (hardware projects/chapters 1-6)
|
| Part 2 - https://www.coursera.org/learn/nand2tetris2 (software
| projects/chapters 7-12)
| bmitc wrote:
| The downside is that part two is the software stack and the
| software grader only supports Python and Java.
| fantod wrote:
| Not when I took it! I did most of those assignments in
| Haskell (a choice I came to regret). Double-checking and it
| seems the grader supports the following languages: C, C++,
| C#, Elixir, Erlang, Go, Haskell, Java, Lua, Node.js, Perl,
| PHP, Python 2.7, Python 3, Ruby, Rust, Scala, Swift.
| bmitc wrote:
| Oh really? I was going off their own FAQ since the graded
| items requiring paying, and I didn't want to do it if I
| couldn't use the languages I wanted, namely F# and Racket.
|
| From the FAQ:
|
| > > Which programming language do I have to use in order to
| complete the assignments in this course?
|
| > We expect learners to submit assignments in any version
| of Java, or Python. We will assume that you have basic
| programming ability in these languages, including a basic
| ability to understand and write simple object-based
| programs.
|
| So is their FAQ out of date I guess?
| rbanffy wrote:
| It's reasonable to support one great programming language
| along with Java, which is kind of a market standard.
| bmitc wrote:
| I didn't say it wasn't reasonable, but it is a downside for
| those wanting to do something different.
|
| I'd prefer they tested emitted code, that way you can use
| anything you want.
| kar1181 wrote:
| As others have commented, the original book was one of those
| little gems that once you read, you realise how blind you were
| before, and it is extremely accessible.
|
| Often material is either too abstract or far too detailed, ECS
| managed to find the perfect balance where someone with a CS
| background can drill down to transistors and come back upwards
| again and really understand where they are going on that journey.
| AtlasBarfed wrote:
| I didn't use this one, but my Computer Organization class which
| did gates -> circuits -> cpu -> microcode -> assembly was the
| lightbulb that allowed me to attempt to deconstruct everything
| to at least the gate level if I had to and made me much more
| comfortable with computer science and software in general.
|
| The only thing that rivaled that lightbulb was aspects of
| Theory of Computation with undecidability, turing machine vs
| stack machine vs state machine powers that theoretically limit
| Von Neumann architecture.
|
| I'll have to pick this up to see what is new, what would really
| be nice is if they can get a bit into SSDs and modern
| superspeed networking, I/O, and multicore that wasn't as
| prevalent back in the day.
| bogomipz wrote:
| >"The only thing that rivaled that lightbulb was aspects of
| Theory of Computation with undecidability, turing machine vs
| stack machine vs state machine powers that theoretically
| limit Von Neumann architecture."
|
| Might you or someone else have a title that you would
| recommend for this that is the equivalent of a "Elements of
| Computing Systems" style book?
| AtlasBarfed wrote:
| It was 1995... so the Comp Org was Tanenbaum's Structured
| Computer Organization. I also used his Operating Systems
| book in the OS class. I thought they were excellent but I
| also had great profs.
|
| I'll try to find my theory of computation text so I can see
| who wrote that, but again that was a great prof that walked
| through it really well.
|
| Alas my bias against lisp may solely be traced to the
| Programming Languages prof that loved Scheme but couldn't
| actually communicate with humans. He could recite pi to 100
| decimal places and was esteemed as brilliant but literally
| couldn't form sentences when talking to students. I suspect
| the lambda calculus would have been a good insight as well,
| but oh well.
| bear8642 wrote:
| Sounds like you had an excellent romp = was scheme taught
| with _SICP_?
|
| Lambda calculus' anonymous functions are fairly simple
| but massively powerful - try this page?
| <https://www.inf.fu-berlin.de/lehre/WS03/alpi/lambda.pdf>
| Banana699 wrote:
| The book "Understanding Computation: From Simple Machines
| to Impossible Programs" by Tom Stuart was/is my Theory Of
| Computation Nirvana experience.
|
| Its motives is the same as NandToTetris: to make any
| programming-literate person comfortable with the rough
| outlines of the theory of computation and its main lore and
| results. The author uses Ruby as an interactive
| "Illustration language", a notation to describe concepts
| that happens to be executable. It's the same way I noticed
| the authors of "Structure and Ineterpetation of Computer
| Programs" use scheme or the way Niklaus Wirth sometimes
| uses Pascal in his educational writings. There is a small
| tutorial chapter in the beginning that crash-courses you
| through all what you need to understand in Ruby to read the
| book.
|
| The structure is a bit different, the book isn't project-
| based like ECS, and there is no natural hierarchy to the
| theory of computation (except maybe the famous
| state_machines ==( push_down_automatons ==(
| turing_machines, and the book does introduce those topics
| in the natural order) that would make the book feel more
| bottom up. There is no exercises or nudges towards
| exploration and tinkering so you need to come equipped with
| your own. I stopped trying to digest it in one reading and
| designated it as one of those books you come back over and
| over again to fully absorb its nourishment.
|
| But the main motivation of the book is strikingly similar
| to that of ECS: to take a complex and jargon-heavy several-
| years study topic and distill the most essential lines and
| edges so that a minimally-educated person motivated enough
| to understand could mostly understand. Some parts felt
| rushed and weren't meant to be digested in full details
| (when he was e.g. discussing a "zoo" of other computational
| systems that feels superficially different or less powerful
| than turing machines but are equivalent nonetheless, he was
| fairly hand-waivy), but the book is so great you will feel
| guilt dwelling on its shortcomings.
| tomstuart wrote:
| That's a very generous comparison, thank you!
| qwertygnu wrote:
| I TAed the class for a while in undergrad and it was one of
| the few CS classes with a textbook that really actually
| helped and augmented the lectures/homework.
|
| The one we used was Introduction to the Theory of
| Computation by Michael Sipser (not hard to find a pdf
| online).
| Jtsummers wrote:
| This particular book/course is aimed at being accessible to
| even high school students. The projects stop short of the
| depth you'd see in a computer engineering degree because it
| ends up being a survey of CMPE. It's a good starting point
| for people who either are considering that discipline of
| formal study, or hobbyists/professionals with different
| backgrounds that want to understand hardware better.
|
| Regardless, you'd need a different book or course to get what
| you're asking for in your last paragraph as that changes the
| scope and target of the book radically.
| zarkov99 wrote:
| This is an amazing book, the engineering, bottom-up counterpart
| to the equally marvelous, but top-down, mathematical SICP.
| Between these two a serious student can get a wonderful
| foundation in CS and a deep and hopefully enduring connection to
| the beauty in it.
| bcheung wrote:
| I wonder what is different in the Second Edition. I own the first
| and absolutely love it.
|
| Also loved the nand2tetris course.
| mkl95 wrote:
| The first edition is probably the book with the highest mind-
| expanding content to page ratio I have ever read.
| cosmic_quanta wrote:
| I have the first edition. It was such a great read. I practiced
| the concepts by building a 4-bit ALU in Minecraft back in the day
| (~2013).
|
| I thoroughly recommend this book.
| jgwil2 wrote:
| Gah! So mad I just bought the first edition!
| potta_coffee wrote:
| I did the same thing. This book has been on my radar and I
| bought it about 3 months ago.
| Jtsummers wrote:
| Don't be mad. I've done that before with some books I really
| liked. Work through the one you've got, then optionally pick up
| the second edition when it's released. I usually throw the
| "oops, they released an update a month after my purchase"
| editions onto my wish list and get it within a year as a
| birthday or Christmas gift.
| Koshkin wrote:
| I have seen books suffer from the "second-system syndrome."
|
| http://www.neilgunton.com/doc/?o=1mr&doc_id=8583
| Jtsummers wrote:
| I wonder what might be some good examples of that. IME, it's
| mostly been college textbooks which suffer from being
| refreshed for the sake of encouraging new purchases (killing
| the used market), often by someone other than the original
| authors and editors.
|
| Of course, some AD&D fans would say everything past 2nd
| edition might be an example of it.
| vmilner wrote:
| Dawkins believes Darwin's "Origin of Species" suffered from
| that as later editions bowed somewhat to religious
| pressure.
| Koshkin wrote:
| > _past 2nd edition_
|
| Case in point: the vomit-inducing colorful print of the 3rd
| edition of Axler's _Linear Algebra Done Right_.
| Jtsummers wrote:
| Hah. I actually had two linear algebra texts in college,
| both ostensibly by the same author (I can't recall now
| who it was so can't verify the later edition was actually
| by the same man and didn't reuse his name). One was my
| mother's in college some time in 1976-1980, the other is
| mine from some time in 2000-2004. If it weren't for the
| exercises, I'd have only used hers because it was a much
| clearer text, it was also less than half the size
| (overall smaller in every dimension: shorter, narrower,
| and thinner).
| de_nied wrote:
| Better alternative: https://pages.cs.wisc.edu/~remzi/OSTEP/
|
| It's also free. Does not cover discrete math and assembly afaik.
| jpochtar wrote:
| Buy this book if you're a programmer who wants to know how
| computers work.
|
| I read the first edition in high school, and if I had to choose
| either this book or my entire undergrad CS education, I'd pick
| this book.
| papandada wrote:
| As someone who programs without a CS undergrad background and
| always feels insecure about it, this sounds both very
| interesting and a very good deal.
| trollski wrote:
| every programmer should know how computers work.
| ryanklee wrote:
| "This second edition has been extensively revised. It has been
| restructured into two distinct parts--part I, Hardware, and
| part II, Software--with six projects in each part. All chapters
| and projects have been rewritten, with an emphasis on
| separating abstraction from implementation, and many new
| sections, figures, and examples have been added. Substantial
| new appendixes offer focused presentation on technical and
| theoretical topics." From the blurb
| abecedarius wrote:
| Wasn't the first edition also in two parts (hardware then
| software) and with an emphasis on separating abstraction from
| implementation? That's how I remember it.
| mhh__ wrote:
| When you've done that read Ulrich Drepper's piece on memory -
| it's tough but this is what sets you apart from a cowboy (not
| so much the section on DRAM pinouts, but the whole thing)
| kolbe wrote:
| I had sort of the opposite experience. The book was really fun,
| but it felt a lot more like I learned how to play some
| abstracted low-level game. It just didn't do much to actually
| inform me about how a modern CPU actually works.
| JonathonW wrote:
| This book follows more along the lines of the coursework for a
| computer engineering degree than a computer science degree--
| especially at institutions where CS lives under the math or IT
| department as opposed to the engineering department.
|
| There can be a lot of overlap between the two, particularly on
| the software side of things, but CS curricula generally
| completely omit the electrical engineering portions of a CE
| curriculum, and that's where ECS puts its focus.
| ROARosen wrote:
| Their video course [1] is supposedly based off the book. In
| the course they state that they are not focused on (nor do
| they have expertise) in the "electrical engineering" aspect
| of computer systems.
|
| In the first part of the course they focus on computer
| "hardware" but only on the logical aspects of it (i.e. logic
| gates etc.). So it probably is considered part computer
| engineering (though the second part does focus on software)
| but I wouldn't say it really overlaps with electrical
| engineering.
|
| [1] https://www.nand2tetris.org/
| de_nied wrote:
| >This book follows more along the lines of the coursework for
| a computer engineering degree than a computer science degree
|
| > but CS curricula generally completely omit the electrical
| engineering portions
|
| Where in this book does it talk about electrical engineering?
| GrumpyYoungMan wrote:
| I have both a computer engineering education and have read the
| book. My recollection is that it's good for what it is but
| omits[0] a heck of a lot of necessary background knowledge to
| apply the material outside of the limited context of the book.
| I'm not saying that it's not good, just be aware that it's not
| the whole picture, so to speak.
|
| [0] or perhaps it would be better to say "has no choice but to
| omit" or it would be ten times thicker than it is.
| anyekwest wrote:
| Seriously. After reading this book I realized that I didn't
| understand shit about computers before. Wondering what the
| second edition adds.
| surajrmal wrote:
| I feel like computer science degrees rarely get into much of
| the hardware beyond some basic assembly. You might have
| benefitted from taking some computer engineering courses
| which cover the topics in this book in much greater detail.
| krisgee wrote:
| Interesting my CS degree had a required introductory
| Computer Engineering course which itself had a pre-req
| first year course where we learned digital logic (among
| other stuff).
|
| We didn't go quite as far as this book seems to but
| definitly got a decent grounding in how computers actually
| do their thing before it was back to theory.
| mhh__ wrote:
| > basic assembly
|
| Even some people actually working on compilers still talk
| about pipeline stalls in a ye olde pentium/RISC sense
| rather than the out of order monsters we have today.
| kar1181 wrote:
| Logged in to say exactly this. I thought I understand
| computation after my degree, and this book, while far from
| perfect, did an incredible job of bringing fundamental
| computation to life in the readers mind.
|
| I'm looking forward to diving into the second edition and
| hoping the second half is better than the first edition.
| limitedmage wrote:
| How similar is this book to CODE by Charles Petzold? I loved that
| book because it progressively builds up an imaginary computer
| using very easy to understand concepts. Even non-technical people
| can read it to understand how computers work internally.
| jhbadger wrote:
| "Elements of Computing Systems" is more detailed and involves
| you actually creating (virtually) a working computer starting
| from NAND gates. CODE is much more introductory.
| Jtsummers wrote:
| _The Elements of Computing Systems_ is a project-based course,
| starting with transistors going through building a computer and
| then an OS and software on top of it. _Code_ goes deeper into
| the history leading to modern computers, but doesn 't offer
| this project-based experience from the transistor level up.
| IMO, the two books offer a nice complement to each other.
| GrumpyYoungMan wrote:
| Petzold's Code is a popularization aimed at non-technical
| readers, as you said. ECS is a textbook aimed at college-level
| CS and Comp. Eng. students and goes into sufficient technical
| depth for the reader to build their own digital computing
| systems.
| Zelphyr wrote:
| I read CODE before reading The Elements of Computing Systems. I
| felt like the former provides details that you actually
| implement in the latter. Highly recommend both and in that
| order.
| bmitc wrote:
| I love this book (the first edition), project, and course.
|
| It is incomplete, but I thought I would share my implementation
| of the software stack in F#. Currently, only the assembler is
| implemented, but in my personal opinion, I think it showcases the
| beauty of F# for domain modeling. When I return to the project, I
| hope to restart the VM implementation and continue adding to the
| FPGA implementation as well. My eventual goal is to have the
| entire software stack built using F# that can than be run on an
| FPGA implementation of the CPU.
|
| https://github.com/bmitc/nand2tetris
|
| Types to model the instructions and source file expressions:
| https://github.com/bmitc/nand2tetris/blob/main/dotnet/Nand2T...
|
| The full assembler, mainly consisting of the parser and
| translator:
| https://github.com/bmitc/nand2tetris/blob/main/dotnet/Nand2T...
___________________________________________________________________
(page generated 2021-02-05 23:00 UTC)