Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
Code: The Hidden Language of Computer Hardware and Software 1st Edition
| Price | New from | Used from |
There is a newer edition of this item:
What do flashlights, the British invasion, black cats, and seesaws have to do with computers? 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.
- ISBN-109780735611313
- ISBN-13978-0735611313
- Edition1st
- PublisherMicrosoft Press
- Publication date
2000
October 11
- Part of series
- Language
EN
English
- Dimensions
6.0 x 1.0 x 8.9
inches
- Length
400
Pages
Similar items that may ship from close to you
Voltage refers to a potential for doing work. Voltage exists whether or not something is hooked up to a battery.Highlighted by 1,170 Kindle readers
The key word here is two. Two types of blinks, two vowel sounds, two different anything, really, can with suitable combinations convey all types of information.Highlighted by 1,137 Kindle readers
In the computer age, the bit has come to be regarded as the basic building block of information.Highlighted by 960 Kindle readers
Editorial Reviews
About the Author
Charles Petzold has been writing about Windows programming for 25 years. A Windows Pioneer Award winner, Petzold is author of the classic Programming Windows, the widely acclaimed Code: The Hidden Language of Computer Hardware and Software, Programming Windows Phone 7, and more than a dozen other books.
Product details
- ASIN : 0735611319
- Publisher : Microsoft Press; 1st edition (October 11, 2000)
- Language : English
- Paperback : 400 pages
- ISBN-10 : 9780735611313
- ISBN-13 : 978-0735611313
- Item Weight : 1.19 pounds
- Dimensions : 6 x 1 x 8.9 inches
- Best Sellers Rank: #196,935 in Books (See Top 100 in Books)
- #20 in Software Design & Engineering
- #111 in Microsoft Programming (Books)
- #162 in Software Development (Books)
- Customer Reviews:
Important information
To report an issue with this product, click here.
About the author

Charles Petzold has been writing about Windows programming for 25 years. A Windows Pioneer Award winner, Petzold is author of the classic Programming Windows, the widely acclaimed Code: The Hidden Language of Computer Hardware and Software, Programming Windows Phone 7, and more than a dozen other books.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonReviews with images
Submit a report
- Harassment, profanity
- Spam, advertisement, promotions
- Given in exchange for cash, discounts
Sorry, there was an error
Please try again later.-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I am impressed by the practicality and scope of this book, so I ordered second, newer edition.
I am impressed by the practicality and scope of this book, so I ordered second, newer edition.
Have you ever wondered just how your computers really work? I mean, really, really work. Not as in "an electrical signal from memory tells the processor the number to be added," but what the electrical signal is, and how it accomplishes the magic of switching on the circuits that add while switching off the other circuits that would do other things with the number. I have. I have wondered this a lot over the past decades.
Yet somehow over the past several decades my hunger for an explanation has never been properly met. I have listened to people explain how two switches wired in series are an "AND"--only if both switches are closed will the lightbulb light. I have listened to people explain how IP is a packet-based communications protocol and TCP is a connection-based protocol yet the connection-based protocal can ride on top of the packet-based protocol. Somehow these explanations did not satisfy. One seemed like answering "how does a car work?" by telling how in the presence of oxygen carbon-hydrogen bonds are broken and carbon dioxide and water are created. The other seemed like anwering "how does a car work" by telling how if you step on the accelerator the car moves forward.
Charles Petzold is different. He has hit the sweet spot exactly. Enough detail to satisfy anyone. Yet the detail is quickly built up as he ascends to higher and higher levels of explanation. It remains satisfying, but it also hangs together in a big picture.
In fact, my only complaint is that the book isn't long enough. It is mostly a hardware book (unless you want to count Morse Code and the interpretation of flashing light bulbs as "software." By my count there are twenty chapters on hardware, and five on software. In my view only five chapters on software--one on ASCII, one on operating systems, one on floating-point arithmetic, one on high-level languages, and one on GUIs--is about ten too few. (Moreover, at one key place in his explanation (but only one) he waves his hands. He argues that it is possible to use the operation codes stored in memory to control which circuits in the processor are active. But he doesn't show how it is done.)
Charles Petzold's explanatory strategy is to start with the telegraph: with how opening and closing a switch can send an electrical signal down a wire. And he wants to build up, step by step, from that point to end with our modern computers. At the end he hopes that the reader can look back--from the graphical user interface to the high-level language software constructions that generate it, from the high-level language software constructions to the machine-language code that underlies it, from the machine-language code to the electrical signals that load, store, and add bits into the computer's processor and into the computer's memory.
But it doesn't stop there. It goes further down into how to construct an accumulator or a memory bank from logic gates. And then it goes down to how to build logic gates--either out of transistors or telegraph relays. And then deeper down, into how the electrons actually move through a transistor or through a relay and a wire.
And at the end I could look back and say, yes, I understand how this machine works in a way that I didn't understand it before. Before I understood electricity and maybe an AND gate, and I understood high level languages. But the whole vast intermediate realm was fuzzy. Now it is much clearer. I can go from the loop back to the conditional jump back to the way that what is stored in memory is fed into the processor back to the circuits that set the program counter back to the logic gates, and finally back to the doped silicon that makes up the circuit.
So I recommend this book to everyone. It is a true joy to read. And I at least could feel my mind expanding as I read it.
First, this book has a lot of pictures and diagrams and you'll want to frequently go back to them and take your time. For this reason, it's probably a pretty bad idea to buy the kindle version.
Second, this books starts out as super-light reading (for me anyway) and then starts getting much harder and denser. For that reason I can't give it 5-stars. The preview you get for your kindle might be misleading for that reason. The pacing, in my opinion, was too slow in the beginning and too fast in the middle.
You'll want to take your time with this book. This is very close to a Malcolm Gladwell or Freakonomics style book, but it's not quite.
But, on the other hand, this really is a good book if you want to learn about this sort of thing. Unlike Gladwell or Freakonomics, you really are learning stuff. I see no reason why this couldn't be used in a college course, but it won't feel like you're reading a textbook. For what it is, it's extremely accessible. And I don't think there's another book quite like this, certainly not of this quality. It is extremely well written. I did wind up taking a few flashcards, though, since it is harder than other books that follow the template of: "one-syllable-word: the amazing hidden side of superlative everythingness." But it's still done in a style that is very close to that. And you'll actually learn things that are true, and not figure out a later after you read the book that studies were misrepresented and facts distorted to fit the narrative of the book.
So that's why I revised this review. I know a bit more than I did when I first wrote it and my expectations of what the book is has changed, too. I'm going to buy whatever this guy puts out next. Four stars only because the pacing was a little off and it might not be exactly what you expect it is from the first couple of chapters. If you want to actually learn about how computers work, there has never been a book this well-written. But you do have to actually want to know how computers work.
Top reviews from other countries
There is only one book that stands out in our memory from that time together. It's the same for both of us. It's this book. Code.
A masterful journey from Morse code to machine code, it carefully addresses every fundamental step along the way. It wisely judges which practical detail to include, and what to abstract away. For example, when we tried to make our own 2-bit adder with transistors, we found the book was not quite adequate to support that activity!
But the purpose of the book is not to guide you through making your own computer; it is to guide you through the principles of a computer at every level. Know-how takes years to acquire; but principles can be conveyed in a book and give the deep insight needed to think about computers. This book succeeds in that endeavour.
The pace, clarity, subtle wit, care and attention in this book are second to none. Rarely have I ever trusted an author so much.
I highly recommend this book. It is in my top five ever.
This is the end of chapter 17 of 24 (or 25? can't remember) equaling about two thirds of the book. After chapter 17, after an introduction to the concept of transistors and microprocessors, a few more components of the computer are introduced and explained rather detailed (keyboard, display, hard drive...), but in general, the pace accelerates quite a bit, as the remaining, more high-level concepts that need to be explained in order to arrive at the modern computer aren't covered with as much depth, but more with a historical retelling of computing going from 1950 until 1999 (when the book was written). This includes mentioning various historically significant programming languages (e.g. algol) and operating systems such as ms-dos and its predecessor, and this is where it's the easiest to notice a slight bias towards microsoft/windows (the author being a programmer for this os and the book being published by microsoft) which is okay, given its historical significance. Unix, upon which nearly all non-microsoft operating systems are based and of which many concepts are also implemented in windows, gets about one or two pages, mainly devoted to historical aspects of its conception (GNU and Linux get about one paragraph).
I personally would have preferred more information about assemblers, about coding beyond individual processor instructions (e.g. writing an assembler in assembly), how high level programming works, about the translation of high-level code into machine code (i.e.compiling), memory management, or the difference between compiling and interpreting. As another reviewer has pointed out, there could have been about 5 more chapters on software. But perhaps this would have blown the scale of the book (easily >100 pages more). Additionally, I think some of the software chapters aren't well chosen, e.g. it doesn't become clear why floating point numbers are more important for understanding the machine than let's say, hex color codes. Still a great book, the hardware parts are written really well.
I own a great many awesome CS books. But this one went to the top of my list very quickly, perhaps just barely 20 pages in. It's not a description of who did what, or how a particular piece of technology works. It's a story of how our modern world came to be. And it's a brilliant story.
Petzold challenges the reader right at the start - assume you're 10 years old and in your home, trying to talk to your friend on the other side of the street. Of course, you don't have a phone or anything like that. You need to use technology which is freely available and will not wake up your parents. Step by step, you discover Morse code (discarding several options prior to reaching this stage). Then you solve various challenges, like assuming your friend does not live in a direct line of sight.
Little by little, we learn about Braille code, simple flashlights, relays, then go on to more ambitious concepts like logic gates, flip-flops and, ultimately, a fully functional computer made of relays and other simple components (which is, I should point out, purely fictional, of course). And I enjoyed every step of this journey.
The book is written with the general reader in mind, it does not target software developers or engineers. I cannot say how someone with no prior computer knowledge would find it; it is beyond my ability to imagine myself without everything I've learned since I began my career path as a programmer. Perhaps the point where assembly is introduced would be a bit too much, or the descriptions of Intel's 8080 and Motorola's 6800. But hey, we do get from flashlights to computers within 400 pages, so it can't all be a smooth ride.
Also, I should mention, the reader is bound to notice how old the book is :) Many technologies that were all around us at the time of writing are already gone and that was barely 20 years ago...
All in all, I probably didn't learn much I didn't already know, but if I ever recommend a computer book to a non-programmer this would be it. Very enjoyable and informative. You will not regret buying this.




















