Code: The Hidden Language of Computer Hardware and Software

Author: Charles Petzold
All Stack Overflow 20
This Year Reddit 69
This Month Reddit 5

About This Book

In CODE, they show us the ingenious ways we manipulate language and invent new means of communicating with each other. And through CODE, we see how this ingenuity and our very human compulsion to communicate have driven the technological innovations of the past two centuries.

Using everyday objects and familiar language systems such as Braille and Morse code, author Charles Petzold weaves an illuminating narrative for anyone who’s ever wondered about the secret inner life of computers and other smart machines.

It’s a cleverly illustrated and eminently comprehensible story—and along the way, you’ll discover you’ve gained a real context for understanding today’s world of PCs, digital media, and the Internet. No matter what your level of technical savvy, CODE will charm you—and perhaps even awaken the technophile within.

Code: The Hidden Language of Computer Hardware and Software


Review Date:


by HeterosexualMail   2019-01-13

We did something similar as well. The labs were tons of fun. I remember having to run a couple dozen lines of code through the CPU cache on a test once, including some sneakery of using code as data at one point. I do appreciate having done it, but I'm not sure how much practical lasting value that really contributed.

That said, for those who are interested in this there is The Elements of Computing Systems: Building a Modern Computer from First Principles , more commonly known as "NAND to Tetris".

Petzold's Code is excellent as well.

Edit: Actually, while I've suggested those two let me throw Computer Systems: A Programmer's Perspective into the mix. It's a book we used across two courses and I really enjoyed it. We used the 2nd edition (and I have no issue recommending people get a cheaper, used copy of that), but there is a 3rd edition now. Being a proper text book it's stupidly priced (you can get Knuth's 4 book box set for $30 more), but it's a good book.

Anyone have suggestions similar to that Computer Systems's text? I've always wanted to revisit/re-read it, but could always used a different perspective.

by gilmi   2019-01-13
by indrora   2019-01-13

I think one of the most profound articles I read about just what makes a computer "work" is Brian Kernighan's article, "What an educated person should know about computers" . (Amazon link)

Another was sitting down and reading Code: the hidden language of computing (Amazon link) and actually walking through it. The book is coming up on 20 years old, but Petzold (who has taught many a developer how to do fancy tricks with their silicon) really sat down and wrote a book that anyone could understand and come away from feeling better off and more knowledgeable about the way our world works. This is the book I refer new programmers and old knitting circle nannies to read when they ask how a computer works.

by userbinator   2018-11-27
If you would like to start at a slightly lower level, Charles Petzold has written a great book on the subject:

by haberman   2018-11-15
> I'm not really sure such a thing exists (or can exist). Verilog isn't "programming" in any way most developers are familiar with, it's a way of describing how logic gates are interconnected.

I've just finished reading Code ( that builds up a RAM array and 8-bit CPU starting from relays. I'm familiar with the concepts. I'm just looking for something that explains how to express these concepts using Verilog.

by berniesanders45   2018-11-10

I don't understand what you are asking, but I will try to answer by giving you several books.

by ryanplant-au   2018-11-10

A few that are only relevant to specific languages or niches:

by unknowngp   2018-11-10

>I want to be able to understand how computers work

Code: The Hidden Language of Computer Hardware and Software

I was on the search for the same as you a couple of weeks ago and people recommended the book above. I just recently started reading it but hopefully someone who has read it can chime in with their opinion.

by 0x7E3   2018-11-10

This book is a great place to start.

by fernandotakai   2018-11-10

a book i would recommend if you want to learn more is Code: The Hidden Language of Computer Hardware and Software

it really explains all the small concepts and where all this "computer magic" came from.