Code: The Hidden Language of Computer Hardware and Software

The cover of CODE does not leave you much to judge it by.  It looks plain and minimalist at best but the reviews on the back cover peaked my interests:

“[A] gem that will appeal to anyone who wants to understand computer technology at it’s essence.”  –David Wall,

” You can tell writing CODE was a labor of love for Perzold and reading it is, too.”  –Bill Camarda,

I agree 100% with both of these reviews of the book but there is much more here.  The author took painstaking care to present topics in a way that makes sense but never dumbs them down into abstracts that are plainly inaccurate like many other books/papers of this nature that overuse poor analogies.  The best way to explain the book is to walk through the chapters a bit:

Chapters 1-6 gently introduce basic principles using a pair of childhood friends who wish to communicate with each other silently after dark when their parents have said “lights out”.  Petzold talks about using a flashlight, morse code and eventually moving up to building a simplistic telegraph system.

Chapters 7-9 builds upon the earlier chapters by explaining different numbering systems and relating them to fingers, toes and bits.

Chapters 10-14 starts to get REALLY interesting where he introduces logic circuits built entirely from telegraph relays.  In earlier chapters, he explains the concepts of telegraph relays and puts them to amazing uses in these chapters.  He brings it as far as building a binary adding machine (conceptually, using your imagination).  As far fetched as it may sound to build a computer entirely from simplistic devices such as relays, it is possible and has been done.  The whole point of this book is to show how simplistic(and simultaneously complex) a computer actually is.

Chapters 15-18 gives an AMAZINGLY gentle introduction to machine code and assembly language which is at the heart of every computer program.  Petzold’s explanation of machine code is by far the best explained version I have seen thus far.  If you want to follow up this book with something useful that will teach you even more about machine language, check out A Short Course In Computer Programming and if you run a Mac, grab the TinyELF 1802 emulator.

Chapters 19-22 work up to slightly higher-leveled details such as handling keyboard input, video output and an interactive console.  The explanations in these chapters are VERY easy to understand.

Chapters 23-25 close out the book with the significance and methods of processing floating point numbers(any number with a decimal point in it).  Higher level languages such as BASIC, C and some others that even I had not heard of.  Finally he closes out the book with the shift into graphical user interfaces, object oriented programming and API’s.  Even if those things sound mind boggling, by the time you read to this point in the book, you will easily be able to grasp these concepts.

Petzold does an amazing job of putting all of the concepts he is trying to convey into a palatable order.  Furthermore, when the reading has gotten REALLY thick in certain chapters, he promptly brings things back into perspective and switches gears into lighter topics like history which gives you a chance to absorb what he has just said and connect the dots.  Petzold also keeps it interesting by referencing later chapters in the book, this is probably one of the reasons that I absolutely could not put this book down.  I managed to plow through it in 3 days.  For anyone interested in computers, this book is a must because it gives you and excellent foundation to learn higher level concepts off of.  Yes, the book was written in 1999 so some of the examples he gives are dated and amusing such as when he quotes system specs of “modern” systems but NOTHING in this book is any less valid today than it was when he wrote it.

If you like the content on this site, please support it by using this link to order from Amazon. You know you were going to go there and buy stuff anyhow so why not help me pay the hosting bill.