Archive for the ‘Book Reviews’ Category

“The Elements of Computing Systems: Building a Modern Computer from First Principles” by Noam Nisan and Shimon Schocken is a small book of approximately 300 pages. It walks the reader through building an entire computer system (hardware and software) from 2 basic elements: a NAND gate and a data flip-flop.

I must admit however, that going through the book feels more like writing code rather than reading. The chapters, organized as programming projects, provide concise background information and clear requirements on what must be built.

“The elements of computing systems” is logically separated into 2 parts: hardware and software. In the first 5 chapters the hardware platform is gradually built using a simple HDL language and run and tested on a simulator (the hardware itself is actually software!). These projects where not difficult and I managed to complete one project per evening after work. The only exception was the final CPU project which took a bit longer. Don’t get the impression that I am some sort of hardware expert – my major is Software Engineering.

Having finished the hardware chapters in a week I was left with the false impression that the rest of the book will be as easy. But I was wrong!

The software projects started with an assembler, followed by a virtual machine and a compiler for a simple high-level object-based language (Jack). They got increasingly more difficult and time-consuming, but also educational and enlightening. As an implementation language I went with Python and it took approximately 3000 lines of code excluding the unit tests.

The final project was to write a simple operating system in the newly implemented Jack programming language. This project was not as difficult as the previous ones, but still required close to 1000 lines of code.

The discrepancy between the difficulty of the hardware and software projects may not be a coincidence, but rather a general insight into their essential complexity.

“The Elements of Computer Systems” is ideal for self study. But the reader should be warned that in order to complete it he/she will need some programming skills and be prepared to invest some effort and time – this endeavor took me approximately 2 months. However his effort will be rewarded – by the end of the book most of the “magic” of how computers work will have disappeared.

Read Full Post »