Code: The Hidden Language of Computer Hardware and Software (2nd Edition)

Code was first published in 1999 and has since become a cult classic in computer science. In 2022, Charles Petzold published the second edition of the book, including new chapters. The author describes the subject of the book as “working of digital computers”. He takes readers on a journey from the invention of the computer to modern computers.

The narration is the first thing that draws attention to the book. The author uses a narrative approach, starting with the story of two friends trying to communicate with each other. The solutions they find lead to discussions of Morse code, Braille, and binary code. The engaging beginning helps readers proceed to the next chapters. Throughout the book, the historical development of the computer and its theoretical background progress together.

Also, the author presents interactive illustrations on the book’s website. While reading the book, QR codes help you to find illustrations for the related topic.

After introducing communication methods in the past, the author slowly switches to circuits. Also the narration gives way to a flow of information and problems and their solutions in the subsequent chapters.

In the fourth chapter, he explains more complex subjects which cover open/closed switches, transfer of data and thickness of wires, conductors, and voltage. Then, logic becomes the main subject. Simple math is explained and four operations, transfer of this knowledge into logic such as OR, AND, NOT are explained.

The book refers to real-life objects in each chapter, and the reader understands how things have progressed over time. When the making of telegraphs is the subject, magnetism, and repeaters are explained. Later, these topics are further elaborated.

Logical operations get more complicated in each new chapter. In the first chapters, OR, NOR, AND, and NOT are introduced. Then, new logic gates, XOR and NAND are introduced with the problems that these solve.

Another important topic is number systems. Starting from the first chapters, the author prepares the reader for this. Starting from chapter nine, number systems, conversions, and representation of text via ASCII, UNICODE, and other systems are covered.

Four operations were theoretically mentioned already. Starting from chapter 14, practicing this knowledge using gates is explained. The history of addition in computers, how it was handled initially and today, sum and carry tables, subtraction, and overflow are all explained.

Chapter 17 is the beginning of another topic. Initially, the author explains oscillators, flip-flops, and holding a bit. This chapter leads to the making of a clock in the next chapter which is new in this edition. The next chapters cover topics such as assemblage of memory, automating arithmetic, registers & busses, and CPU control signals

The last chapters of the book are devoted to explaining the operating system, coding, and the world brain. Based on the knowledge that is acquired through the preceding chapters, the author brings everything together and explains how things are related.

“My original idea with Code was to start with very simple concepts but slowly build to a very deep understanding of the workings of digital computers” from the preface.

The author does what he says in the preface. However, there are also some chapters where the reader might be lost. The reason might be the lack of providing additional recaps or summaries of complex solutions, which would be helpful for readers who may have difficulty comprehending the subjects presented in a given chapter and need to revisit them multiple times to fully understand the concepts presented.

Overall, Codehelps you have a deep understanding of the working of computers. It appeals to a broad audience regardless of their professional background with its convenient language and engaging storytelling style. If you are curious about what is behind a computer, this book should be on your reading list.