HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
The Elements of Computing Systems: Building a Modern Computer from First Principles

Noam Nisan, Shimon Schocken · 3 HN points · 33 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "The Elements of Computing Systems: Building a Modern Computer from First Principles" by Noam Nisan, Shimon Schocken.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
A textbook with a hands-on approach that leads students through the gradual construction of a complete and working computer system including the hardware platform and the software hierarchy. In the early days of computer science, the interactions of hardware, software, compilers, and operating system were simple enough to allow students to see an overall picture of how computers worked. With the increasing complexity of computer technology and the resulting specialization of knowledge, such clarity is often lost. Unlike other texts that cover only one aspect of the field, The Elements of Computing Systems gives students an integrated and rigorous picture of applied computer science, as its comes to play in the construction of a simple yet powerful computer system. Indeed, the best way to understand how computers work is to build one from scratch, and this textbook leads students through twelve chapters and projects that gradually build a basic hardware platform and a modern software hierarchy from the ground up. In the process, the students gain hands-on knowledge of hardware architecture, operating systems, programming languages, compilers, data structures, algorithms, and software engineering. Using this constructive approach, the book exposes a significant body of computer science knowledge and demonstrates how theoretical and applied techniques taught in other courses fit into the overall picture. Designed to support one- or two-semester courses, the book is based on an abstraction-implementation paradigm; each chapter presents a key hardware or software abstraction, a proposed implementation that makes it concrete, and an actual project. The emerging computer system can be built by following the chapters, although this is only one option, since the projects are self-contained and can be done or skipped in any order. All the computer science knowledge necessary for completing the projects is embedded in the book, the only pre-requisite being a programming experience. The book's web site provides all tools and materials necessary to build all the hardware and software systems described in the text, including two hundred test programs for the twelve projects. The projects and systems can be modified to meet various teaching needs, and all the supplied software is open-source.
HN Books Rankings
  • Ranked #19 this year (2021) · view
  • Ranked #16 all time · view

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
EoCS is a modern classic in computer science and engineering, I am very excited to see a second edition.

First edition on amazon: https://www.amazon.com/Elements-Computing-Systems-Building-P...

Second edition pre-order on amazon: https://www.amazon.com/Elements-Computing-Systems-second-Pri...

I don't think there's an easy answer to this question. Software engineers still don't know how to exactly or even efficiently communicate with each other. It's still an evolving field and process. In general, it is helpful to understand software development as a sub-field of systems theory and design, so any book that discusses systems should help one better understand software development.

In general, I do also echo some of the other comments. If you are helping to design the app, you shouldn't necessarily need to understand the implementation details. In my experience, clients, whether they be external or internal or colleagues, getting too involved into what they think the implementation should be is usually a disaster. It puts pressure on the system to conform to how they think it should be, which is usually not necessarily how it should be, and it basically adds unnecessary constraints. The real constraints should be what the software should do and specifications on that, including how the software is intended to be maintained and extended.

Some thoughts on some specific courses and books that I think would be helpful to better understand the goals of software development and design and ways to think about it all:

Programming for Everyone - An Introduction to Visual Programming Languages: https://www.edx.org/course/programming-for-everyone-an-intro...

I think this course should be taken by managers, designers, and even software engineers. The primary result is that you'll come out of it knowing state charts, which are an extension to state machines, and this will be very useful for thinking about software and organizing what the software should do. Handling state is one of the primary problems in software, and you might notice that all of the various paradigms (OOP, functional, imperative, actors, etc.) in computer programming relate to the various ways people think about handling state in a computing system.

How to Code: Simple Data and Complex Data:

https://www.edx.org/course/how-to-code-simple-data

https://www.edx.org/course/how-to-code-complex-data

https://www.edx.org/micromasters/ubcx-software-development

These courses are taught by a designer of the Common Lisp language and based upon the excellent book How to Design Programs. It is essentially a language agnostic course that uses Racket to build up design paradigms that teaches you how to sort out your domain problem and designs into data and functions that operate on that data. The courses are part of a MicroMasters program, so if you really want to get into Java, that is taught in the follow-on courses.

Based upon your last comment, here are some book suggestions on how computers work:

Code: The Hidden Language of Computer Hardware and Software: https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

The Pattern On The Stone: The Simple Ideas That Make Computers Work: https://www.amazon.com/Pattern-Stone-Computers-Science-Maste...

But How Do It Know? - The Basic Principles of Computers for Everyone: https://www.amazon.com/But-How-Know-Principles-Computers/dp/...

The Elements of Computing Systems: Building a Modern Computer from First Principles: https://www.amazon.com/Elements-Computing-Systems-Building-P...

If you want to do the lite version of this there is a book called “From NAND to Tetris” that is an instructional book for a similar class and walks through doing much of the same thing. It helped me connect the dots between “I know how a transistor works” and “I know how assembly language works” that I have never learned otherwise. Even if you just skim the book without doing the project you will likely learn some things.

The Elements of Computing Systems: Building a Modern Computer from First Principles https://www.amazon.com/dp/0262640686/ref=cm_sw_r_cp_api_i_yH...

amcvitty
I’m doing this right now and it’s a lot of fun and very accessible.

I saw there’s a highly rated Coursera version too (I prefer books to videos so I haven’t looked at it)

Yeah, I guess it depends on what legacy you're willing to part from.

Something like https://www.amazon.com/Elements-Computing-Systems-Building-P... is not hard, but it's arguably a toy system.

IMO Project Oberon starts from the same principles and builds up to a productive enironment including text processing, a compiler, very basic hypertext, basic networking and hardware to run it on.

I'm also self taught, some books I feel have been really helpful to me:

Elements of Computing Systems

Writing and Interpreter in Go

https://www.amazon.com/Elements-Computing-Systems-Building-P...

https://www.amazon.com/s?k=writing+an+interpreter+in+go&i=st...

One of my favorite books on subject is The Elements of Computing Systems: Building a Modern Computer from First Principles by Noam Nisan https://www.amazon.com/Elements-Computing-Systems-Building-P...
djangovm
Would you say that this book is still relevant, now that it is 15 years old?
jambutters
yes, its structured in a way that's very hands on
dang
It's wonderfully relevant because it takes you through the basics and those are all still the same. Their simulator software was already old when I went through the book a few years ago, but I'm sure it still works fine.
dbish
Agreed. I read through this on a recent vacation and even though i have a computer engineering degree, it was nice to get through the basics again and they have some fun exercises.
Check out the following:

The Elements of Computing Systems: Building a Modern Computer from First Principles

https://www.amazon.com/Elements-Computing-Systems-Building-P...

There is a book "The Elements of Computing Systems: Building a Modern Computer from First Principles"[0] that is often called "From NAND to Tetris". This has you building a computer simulator from the ground up (NAND to Tetris). There is a website[1] and a Cousera course[2]. And a TED talk[3].

[0] https://www.amazon.com/Elements-Computing-Systems-Building-P...

[1] http://nand2tetris.org/

[2] https://www.coursera.org/learn/build-a-computer

[3] https://www.ted.com/talks/shimon_schocken_the_self_organizin...

I highly recommend http://www.nand2tetris.org/ and the The Elements of Computing Systems book https://www.amazon.com/Elements-Computing-Systems-Building-P...
O_H_E
Thanks :)
This is really neat! Also if you want to learn to build a computer from scratch without hardware, just to learn how computers work, The Elements of Computing Systems is a great book to check out. It's used as a text in some CS programs but it is very readable and easy to follow and the software is free and online.

https://www.amazon.com/Elements-Computing-Systems-Building-P...

http://www.nand2tetris.org/ is the website for it.

2OEH8eoCRo
Working through it as we speak. Computer is finished, doing assembler now.
userbinator
I'd recommend Petzold's https://www.amazon.com/Code-Language-Computer-Hardware-Softw... too.
Elissa343
My mothers neighbour is working part time and averaging $9000 a month. I'm a single mum and just got my first paycheck for $6546! I still can't believe it. I tried it out cause I got really desperate and now I couldn't be happier. Heres what I do, •••••••••>> http://www.joinmate2.com
>"Part 2 didn't exist when I worked through the book and watched the Part 1 lectures a couple years ago, so presumably this is new."

Thanks for the confirmaton, I didn't remember seeing this either.

"The book, btw, is a masterpiece ..."

Agreed. The paper back is a nice format and reasonably priced for a technical book as well:

https://www.amazon.com/Elements-Computing-Systems-Building-P...

Mar 31, 2017 · pankajdoharey on The Min-T Processor
I think Implementing a 6502 is a good example for an architecture implementation. Since it has already been done in numerous NES emulation projects, A lot of us have a good understanding of the CPU. Plus it is the part of a history which many kids could relate to. The video game era and genesis of personal computing era was almost entirely based off of this single CPU. It isnt small but definitely a stepping stone towards understanding a modern CPU. anything lesser makes it just a toy. For a toy, I like the one described in "Elements of Computign systems" here https://www.amazon.com/Elements-Computing-Systems-Building-P...
Retric
I would go with the Intel 4004 for historic reasons https://en.m.wikipedia.org/wiki/Intel_4004 or other 4bit CPU for simplicity. Latency is going to force any large scale CPU into toy category, but you can still do a lot even at a few kHz with a 4 bit CPU.
tonyRobinson
8 bit and 4 bit CPUs are horrible things to teach. By being 16 bits throughout you can do many high level things in one instruction. It also makes for an efficient FORTH implementation.
My choice for bottom-up book: The Elements of Computing Systems: Building a Modern Computer from First Principles https://www.amazon.com/Elements-Computing-Systems-Building-P...
impappl
This is also known as the "nand2tetris" course: http://www.nand2tetris.org/

Great book!

Interesting. Anyone know if it's updated from [0]? Wonder if it'll just use the same Software. The book [1] was interesting.

[0] http://nand2tetris.org/

[1] https://www.amazon.com/Elements-Computing-Systems-Building-P...

ioseph
Looks like it's still the same course although with video lectures added
guiambros
I finished it a couple of months ago. It uses the exact same structure and software as described in the book (HACK language, etc).

The included hands-on projects made it more fun and interesting. Basically you'll build a simple computer from the ground up, starting with flip-flops and going all the up up to ALU, memory and CPU.

The grader works well, so you can submit your code and it'll grade you in realtime. You can finish it in less than a month, if you have experience with electronics and Boolean logic.

Patrick_Devine
I've gone through the book and got as far as building the computer, writing the assembler and running some programs on it. Does the course go beyond this? I haven't built the virtual machine or written the compiler, but it looked like from the description of the course, they didn't do that either.
dan1234
According to the Nand2Tetris site[0], this is just part 1 and only covers chapters 1-6. Part 2 will cover chapters 7-12 but looks to be still in development.

[0]http://nand2tetris.org/

I recommend the associated book[0] to everyone who asks me about programming book recommendations. The book arrives, and you are shocked at how small it is, just a few hundred pages. If you follow all of the exercises, you get an understanding of how logic works inside of processors (logic gates, adders, etc.), how machine code drives them, how assembly maps to machine code, how a basic virtual machine language (like the JVM) can compile to assembly, then how a higher level language is designed and compiled to the VM.

After doing all of this, you make Tetris in the high level language. It's a badass book, super well-written, and what I consider an essential text.

[0] https://www.amazon.com/Elements-Computing-Systems-Building-P...

anton_gogolev
Haven't read the book you're recommending, but I feel it's more or less close to Code[0] by Charles Petzold, which in itself is a fascinating read.

[0]: https://www.amazon.com/Code-Language-Computer-Hardware-Softw...

lukeck
I read both books a long time ago. My recollection is that Code spends more time building context and explaining why something works as it does. "Elements of Computing Systems" gives more detail on how to implement many of the same concepts in a simple way. Both are great books.
GrumpyYoungMan
The two are not at all similar. Petzold's "Code" is good but is aimed at non-technical readers while "The Elements of Computing Systems" is more or less a textbook that encapsulates a longitudinal slice of a 4-year computer engineering program, complete with exercises. It's really quite impressive in what it manages to cover (although the massive amount of material glossed over or omitted does make me wince).
mavelikara
+1. This is also my default recommendation for people from other disciplines who want to get in to professional programing. This is a great intro to understanding how everything hangs together, before going on to learn the framework flavor of this month.
josh-wrale
Thanks! I bought the book earlier today and am looking forward to it. One of the things I'm interested in is how to construct gate-level emulation in software. I saw a video about 6502 hardware emulation where the guy said his was half-cycle complete. Looking forward to understanding all of that.
clevernickname
> I saw a video about 6502 hardware emulation where the guy said his was half-cycle complete. Looking forward to understanding all of that.

To give you a little head start on that, where many digital circuits are clocked (or make one step) on just the rising edge of a clock cycle (where it transitions from low-to-high), the 6502 clocks on both the rising and falling edges; certain parts (like the hardware that initiates a memory access) will fire on the rising edge, then the part that needed that information will fire on the rising edge half a cycle later (like making the ALU start adding the value that was just fetched from memory to the accumulator)[1].

If you've ever heard someone say that a 6502 of one speed is roughly equivalent to a Z80 clocked at twice the speed, now you know why: the internal logic is essentially clocked twice as fast as the input clock.

[1] IIRC this isn't completely correct, and external memory is allowed to take up to 3/4ths of a cycle to perform a memory access to accommodate slower ROMs, but you get the idea.

Narishma
Is the 6502 unique in working that way? If so, why didn't other processors use the same technique?
vardump
> If you've ever heard someone say that a 6502 of one speed is roughly equivalent to a Z80 clocked at twice the speed, now you know why: the internal logic is essentially clocked twice as fast as the input clock.

1 MHz 6502 is about as fast as 3 MHz Z80. Although your mileage my vary, some say up to 4 MHz Z80.

Animats
Note that the book is from 2005.
seibelj
That makes absolutely no difference. Nothing about the fundamentals of computer systems has changed significantly in 30 years let alone 11
bhrgunatha
The authors also created a course on Coursera [1] which is also worth a look. Although it only covers the first half of the book (up to Assembler Language.) The authors have promised part 2 but it hasn't been released yet.

[1] https://www.coursera.org/learn/build-a-computer

>> "no one has time to learn everything" - especially at the beginning of their career.

I wish I had this book at the beginning of my career. http://www.amazon.com/Elements-Computing-Systems-Building-Pr.... Makes you design the hardware, then the software for that hardware.

Should not take more than 8 - 12 weeks with school work/day job.

Why not learn just one of these: - programming languages with different paradigms (Functional, Imperative, Logic etc) - Data structures and algorithms (implement a few in each paradigm) - Compilers - Digital electronics - Operating systems - Networking - Math for CS - Orthogonal: Art of debugging, collaboration, technical writing for documentation

Learning the fundamentals, becoming better at these will help one see through the 'stack of tons of languages, tools, frameworks' and yet be able to handle all of these with relative ease.

I wish 'Elements of Computing systems'[1] were there when I started as a programmer.

[1] http://www.amazon.com/Elements-Computing-Systems-Building-Pr...

Are you thinking of "The Elements of Computing Systems: Building a Modern Computer from First Principles" <http://www.amazon.com/Elements-Computing-Systems-Building-Pr... by Noam Nisan and Shimon Schocken?
johan_larson
That's the one. Thanks!
Jul 07, 2015 · notdan on Project Oberon
This sounds similar to another book/course/project I've seen that was quite interesting to work through:

From NAND to TetrisBuilding a Modern Computer From First Principles

http://www.nand2tetris.org/

http://www.amazon.com/The-Elements-Computing-Systems-Princip...

If this is something that tickle's your fancy, you should check out 'The Elements of Computing Systems' http://www.amazon.com/The-Elements-Computing-Systems-Princip....
it's free online and great, but I also enjoy my hard copy(it was like $20, so so so cheap for what it is)

http://www.amazon.com/The-Elements-Computing-Systems-Princip...

edit: $30 I guess, still worth it.

Alupis
Good free ebook for learning how a computer does what it does:

"Programming From The Ground Up"

http://download-mirror.savannah.gnu.org/releases//pgubook/Pr...

good idea, I would buy two kinds of books 1) one which aggregates all the "How do I write an OS from scratch" info under links below into one coherent whole. and 2) a tutorial on how to build a domain-specific OS, say OS that only knows to run a web-server, or OS for FPGA or Raspberry Pi, or a mobile OS that knows messaging and nothing else

1. http://www.quora.com/How-do-I-write-an-operating-system

2. http://www.quora.com/If-you-were-to-write-a-new-operating-sy...

3. http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/...

4. http://www.amazon.com/The-Design-UNIX-Operating-System/dp/01...

5. http://www.amazon.com/The-Elements-Computing-Systems-Princip...

6. http://www.returninfinity.com/baremetal.html

An adder in functional Verilog:

a + b

Best go with structural if you want to actually learn something. This book ( http://www.amazon.com/The-Elements-Computing-Systems-Princip... ) is very good and I think still stands as the best introduction to this type of stuff I've seen. It's also presented in a straight forward enough way that it's good enough self-study for anyone with some programming experience.

p1esk
Here's a link to the course based on that book: http://www.nand2tetris.org/course.php

Note, however, that it does not use actual hardware, nor a real hardware description language - it's just a hardware simulator (this might be important for someone who's interested in FPGA per se).

I would also recommend The Elements of Computing Systems: Building a Modern Computer from First Principles

http://www.amazon.com/The-Elements-Computing-Systems-Princip...

http://www.nand2tetris.org/

Not sure if this is the right direction or not. In different ways they are all, essentially, about programming...

http://www.amazon.com/Code-Language-Computer-Hardware-Softwa...

http://www.amazon.com/Elements-Computing-Systems-Building-Pr...

http://www.amazon.com/Structure-Interpretation-Computer-Prog...

http://www.amazon.com/G%C3%B6del-Escher-Bach-Eternal-Golden/...

http://www.amazon.com/Pragmatic-Programmer-Journeyman-Master...

Good luck!

dlf
Ditto on "Code." As a non-programmer learning to program, it was everything I needed to know to wrap my head around how everything actually works.
syedkarim
This is absolutely the right direction--thanks! The one book on the list that might get kicked back is "Structure and Interpretation of Computer Programs". Too bad, since it's probably the most concrete. This is a great starting point, thanks again.
Look through this book, I graduated with a degree in ECE 5 years ago, and this book blew me away: http://www.amazon.com/Elements-Computing-Systems-Building-Pr...
The Elements of Computing Systems: Building a Modern Computer from First Principles[1][2]

----

[1]: http://www1.idc.ac.il/tecs/

[2]: http://www.amazon.com/Elements-Computing-Systems-Building-Pr...

Feb 28, 2011 · 3 points, 2 comments · submitted by shawndumas
shawndumas
Offical Site[1]

----

[1]: http://www1.idc.ac.il/tecs/

thisrod
Note that "building" is used in a loose sense: the transistors and wires are simulated. It sounds good anyway.

It would be interesting to compare this to the last chapter of SICP, which also builds a simulated computer and compiler. Around 1980, the authors swapped their typewriters for soldering irons and built it for real.

> ... working knowledge of the inner workings of computers ...

I'm a big fan of 'The Elements of Computing Systems' - takes you from NAND gates to pong.

http://www.amazon.co.uk/Elements-Computing-Systems-Building-...

Get a copy of "The Elements of Computing Systems"

http://www.amazon.com/Elements-Computing-Systems-Building-Pr...

http://books.google.com/books?id=THie6tt-2z8C&dq=the+ele...

which will seriously take you from logic gate/chip design all the way to scripting languages and an implementation of tetris on a java-esque language/vm. Totally awesome!

You can download the simulation software which is used in the book here if you want to play w/ logic gates/HDL etc. more http://www1.idc.ac.il/tecs/

shawndumas
found a nice online one[1]

[1]: http://news.ycombinator.com/item?id=1702112

A little known gem: The Elements of Computing Systems

http://www.amazon.com/Elements-Computing-Systems-Building-Pr...

This book takes you from logic gates to writing your own (extremely simple) virtual machine, programming language, etc. It's a bit fast paced and project based, but it'll run you through a very high level overview of the whole gamut.

I've heard good reports about "The elements of computing systems"

http://www.amazon.com/gp/product/0262640686?ie=UTF8&tag=...

Theres a tech talk about the book:

http://video.google.co.uk/videoplay?docid=765404376202115650...

A job that needs breadth: CIO.

If you want to develop knowledge in depth, this is a good place to start:

http://www.amazon.com/Elements-Computing-Systems-Building-Pr...

Buy the book, download the courseware for free, and learn how computers work from NAND gates up. Implement your own OO language on the hardware you've built and write your own OS in it. Then write games for the resulting system. This will put you ahead of most coders out there.

BushyMark
The book looks awesome! Just ordered from Amazon! Thanks!
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ [email protected]
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.