New on Amazon: Unwell
Buy new:
-30% $28.19
FREE delivery Wednesday, May 7 to Nashville 37217 on orders shipped by Amazon over $35
Ships from: Amazon.com
Sold by: Amazon.com
$28.19 with 30 percent savings
List Price: $39.99
Get Fast, Free Shipping with Amazon Prime FREE Returns
FREE delivery Wednesday, May 7 to Nashville 37217 on orders shipped by Amazon over $35
Or Prime members get FREE delivery Tomorrow, May 3. Order within 6 hrs 13 mins.
In Stock
$$28.19 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$28.19
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Ships from
Amazon.com
Amazon.com
Ships from
Amazon.com
Sold by
Amazon.com
Amazon.com
Sold by
Amazon.com
Returns
30-day refund/replacement
30-day refund/replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
$24.20
May have some shelf-wear due to normal use. Your purchase funds free job training and education in the greater Seattle area. Thank you for supporting Goodwill's nonprofit mission! May have some shelf-wear due to normal use. Your purchase funds free job training and education in the greater Seattle area. Thank you for supporting Goodwill's nonprofit mission! See less
$3.99 delivery May 19 - 20 to Nashville 37217. Details
Or fastest delivery May 8 - 13. Details
Only 3 left in stock - order soon.
$$28.19 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$28.19
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
Access codes and supplements are not guaranteed with used items.
Ships from and sold by Seattlegoodwill.
Kindle app logo image

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.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

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

4.8 out of 5 stars 753 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$28.19","priceAmount":28.19,"currencySymbol":"$","integerValue":"28","decimalSeparator":".","fractionalValue":"19","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"Wusu1vkjNhDGlOOpsGtif0m79siBqNwqQTHIUJMqZs1WQ4UKcYsrWKbgCPLXh37JW7CiQ8yLejIvo5Es0zfebFcV9pKxi0Ulvpm3HTP3XBy%2FR8Qu5U4gBVh7aT8u4NlYMzBhue16bbsX%2FDVwxSe4QA%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$24.20","priceAmount":24.20,"currencySymbol":"$","integerValue":"24","decimalSeparator":".","fractionalValue":"20","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"Wusu1vkjNhDGlOOpsGtif0m79siBqNwqsyuR2WBhwlpvNIq34PYzGIQYsGR8slQcWx5pDtvxKTOwW%2FTaRUh9Ukdf3YAPWBhHC2mG6%2F26otbE38RS%2FfHwmlfTvNrBK5w5FKEzUlA70H5VPX9B1gt8RyqrnjCxkmL7Jzdy3j3GRn8YnzTuGJzzL7vs%2FLeyNyqy","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons

The classic guide to how computers work, updated with new chapters and interactive graphics

"For me, Code was a revelation. It was the first book about programming that spoke to me. It started with a story, and it built up, layer by layer, analogy by analogy, until I understood not just the Code, but the System. Code is a book that is as much about Systems Thinking and abstractions as it is about code and programming. Code teaches us how many unseen layers there are between the computer systems that we as users look at every day and the magical silicon rocks that we infused with lightning and taught to think."

- Scott Hanselman, Partner Program Director, Microsoft, and host of Hanselminutes

Computers are everywhere, most obviously in our laptops and smartphones, but also our cars, televisions, microwave ovens, alarm clocks, robot vacuum cleaners, and other smart appliances. Have you ever wondered what goes on inside these devices to make our lives easier but occasionally more infuriating?

For more than 20 years, readers have delighted in Charles Petzold's illuminating story of the secret inner life of computers, and now he has revised it for this new age of computing. Cleverly illustrated and easy to understand, this is the book that cracks the mystery. You'll discover what flashlights, black cats, seesaws, and the ride of Paul Revere can teach you about computing, and how human ingenuity and our compulsion to communicate have shaped every electronic device we use.

This new expanded edition explores more deeply the bit-by-bit and gate-by-gate construction of the heart of every smart device, the central processing unit that combines the simplest of basic operations to perform the most complex of feats. Petzold's companion website, CodeHiddenLanguage.com, uses animated graphics of key circuits in the book to make computers even easier to comprehend.

In addition to substantially revised and updated content, new chapters include:

  • Chapter 18: Let's Build a Clock!
  • Chapter 21: The Arithmetic Logic Unit
  • Chapter 22: Registers and Busses
  • Chapter 23: CPU Control Signals
  • Chapter 24: Jumps, Loops, and Calls
  • Chapter 28: The World Brain

From the simple ticking of clocks to the worldwide hum of the internet, Code reveals the essence of the digital revolution.

Frequently bought together

This item: Code: The Hidden Language of Computer Hardware and Software
$28.19
Get it as soon as Wednesday, May 7
In Stock
Ships from and sold by Amazon.com.
+
$25.63
Only 5 left in stock - order soon.
Ships from and sold by Woodville Books.
+
$28.27
Get it as soon as Wednesday, May 7
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Some of these items ship sooner than the others.
Choose items to buy together.

From the Publisher

Image of an encoder circuit

The classic guide to how computers work

This new expanded edition explores more deeply the bit-by-bit, gate-by-gate construction of the heart of every smart device—the central processing unit that combines the simplest of basic operations to perform the most complex of feats. Petzold's companion website uses animated graphics of key circuits in the book to make computers even easier to comprehend.

In addition to substantially revised and updated content, new chapters include:

  • Chapter 18: Let’s Build a Clock!
  • Chapter 21: The Arithmetic Logic Unit
  • Chapter 22: Registers and Busses
  • Chapter 23: CPU Control Signals
  • Chapter 24: Jumps, Loops, and Calls
  • Chapter 28: The World Brain

Code, 2nd Edition, by Charles Petzold

"...the first book about programming that spoke to me."

For me, Code was a revelation. It was the first book about programming that spoke to me. It started with a story, and it built up, layer by layer, analogy by analogy, until I understood not just the Code, but the System. Code is a book that is as much about Systems Thinking and abstractions as it is about code and programming.

Code teaches us how many unseen layers there are between the computer systems that we as users look at every day and the magical silicon rocks that we infused with lightning and taught to think.

Scott Hanselman, Partner Program Director, Microsoft, and host of Hanselminutes

Preface to the Second Edition

The first edition of this book was published in September 1999. With much delight I realized that I had finally written a book that would never need revising! This was in stark contrast to my first book, which was about programming applications for Microsoft Windows. That one had already gone through five editions in just ten years. My second book on the OS/2 Presentation Manager (the what?) became obsolete much more quickly. But Code, I was certain, would last forever.

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. Through this steady progression up the hill of knowledge, I would employ a minimum of metaphors, analogies, and silly illustrations, and instead use the language and symbols of the actual engineers who design and build computers. I also had a very clever trick up my sleeve: I would use ancient technologies to demonstrate universal principles under the assumption that these ancient technologies were already quite old and would never get older. It was as if I were writing a book about the internal combustion engine but based on the Ford Model T.

I still think that my approach was sound, but I was wrong in some of the details. As the years went by, the book started to show its age. Some of the cultural references became stale. Phones and fingers supplemented keyboards and mice. The internet certainly existed in 1999, but it was nothing like what it eventually became. Unicode—the text encoding that allows a uniform representation of all the world’s languages as well as emojis—got less than a page in the first edition. And JavaScript, the programming language that has become pervasive on the web, wasn’t mentioned at all.

Those problems would probably have been easy to fix, but there existed another aspect of the first edition that continued to bother me. I wanted to show the workings of an actual CPU—the central processing unit that forms the brain, heart, and soul of a computer—but the first edition didn’t quite make it. I felt that I had gotten close to this crucial breakthrough but then I had given up. Readers didn’t seem to complain, but to me it was a glaring flaw.

That deficiency has been corrected in this second edition. That’s why it’s some 70 pages longer. Yes, it’s a longer journey, but if you come along with me through the pages of this second edition, we shall dive much deeper into the internals of the CPU. Whether this will be a more pleasurable experience for you or not, I do not know. If you feel like you’re going to drown, please come up for air. But if you make it through Chapter 24, you should feel quite proud, and you’ll be pleased to know that the remainder of the book is a breeze.

Charles Petzold

Editorial Reviews

About the Author

Charles Petzold is also the author of The Annotated Turing: A Guided Tour through Alan Turing's Historic Paper on Computability and the Turing Machine (Wiley, 2008). He wrote a bunch of other books too, but they're mostly about programming applications for Microsoft Windows, and they're all obsolete now. He lives in New York City with his wife, historian and novelist Deirdre Sinnott, and two cats named Honey and Heidi. His website is www.charlespetzold.com.

Product details

  • Publisher ‏ : ‎ Microsoft Press; 2nd edition (August 7, 2022)
  • Language ‏ : ‎ English
  • Paperback ‏ : ‎ 480 pages
  • ISBN-10 ‏ : ‎ 0137909101
  • ISBN-13 ‏ : ‎ 978-0137909100
  • Item Weight ‏ : ‎ 1.45 pounds
  • Dimensions ‏ : ‎ 6 x 0.99 x 9 inches
  • Customer Reviews:
    4.8 out of 5 stars 753 ratings

About the author

Follow authors to get new release updates, plus improved recommendations.
Charles Petzold
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

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

4.8 out of 5 stars
753 global ratings

Review this product

Share your thoughts with other customers

Customers say

Customers find the book explains complex topics well, with one review highlighting how it guides readers through building a conceptual CPU. They describe it as an engaging and fun read.

AI-generated from the text of customer reviews

Select to learn more

24 customers mention "Literacy"24 positive0 negative

Customers praise the book's ability to explain complex topics clearly, with one customer noting how it guides readers through building a conceptual CPU.

"...It's an amazingly clear but slightly challenging read. I have given this book as a gift many many times. It's an absolute classic in my opinion." Read more

"A clear, thorough, and well structured introduction. The typeset, length, and systematic approach make this book a great read and an engaging one too." Read more

"...It’s easy to read, goes over the whole process from early communication with flash lights to switches and routers, to how code works with the..." Read more

"...Great read, very thorough introduction to AI pragmatics and evolutionary Quantum processing." Read more

5 customers mention "Reading enjoyment"5 positive0 negative

Customers find the book engaging and fun to read.

"...and systematic approach make this book a great read and an engaging one too." Read more

"...Informative and FUN- this book is extremely well-written." Read more

"This book teaches things we may never paid attention to. It’s captivating and educating. You don’t need to be a programmer to read this book...." Read more

"Easy, fun read..." Read more

Very will organize thought
5 out of 5 stars
Very will organize thought
It start from beginning and slowly takes you to how really computers works. Very helpful information to me as a software developer.
Thank you for your feedback
Sorry, there was an error
Sorry we couldn't load the review

Top reviews from the United States

  • Reviewed in the United States on March 19, 2025
    This is an amazing book for the right kind of reader. It's a lot like Euclid's Elements but for computers as it leads the reader through designing a computer from first principles and builds to the point of creating software and adding peripherals. It's an amazingly clear but slightly challenging read. I have given this book as a gift many many times. It's an absolute classic in my opinion.
  • Reviewed in the United States on April 3, 2025
    Great
  • Reviewed in the United States on December 22, 2024
    I read the first edition of this book circa 2006. As a high school kid, I was already well versed in software but hardware and the way a CPU works felt like magic. I then read CODE and it forever changed my understanding of computers and how they worked at the lowest level. I consider it one of the most influential books I have ever read given at the time CS/EE wasn’t what it is today. Resources to learn this kind of stuff as an adolescent were scarce and or non-existent. I bought the second edition just to have it on my shelf.
    4 people found this helpful
    Report
  • Reviewed in the United States on January 25, 2025
    I wanted to know more about all the fuzz is about with AI and Language Learning Models, a friend recommended this book, and wow, it is the authoritative compendium on the subject matter. Great read, very thorough introduction to AI pragmatics and evolutionary Quantum processing.
  • Reviewed in the United States on February 1, 2025
    A clear, thorough, and well structured introduction. The typeset, length, and systematic approach make this book a great read and an engaging one too.
  • Reviewed in the United States on December 29, 2024
    A very basic book that should be mandatory for anyone working with computers, from basic coding to electrical engineers. It’s easy to read, goes over the whole process from early communication with flash lights to switches and routers, to how code works with the computers hardware. As a data scientist without much of a computer science background, this was a delight.
    2 people found this helpful
    Report
  • Reviewed in the United States on January 6, 2023
    As an ardent reader of the past 1st edition, I was fairly excited to get the latest version. That is, until I encountered the history chapter of the new edition.

    For one thing, what I do NOT understand in this second edition is the newly added description of August Ada Byron (countless of Lovelace). The author claims it was Babbage who was the first programmer to design the engines, not Ada. I am not trying to start a futile argument here about who has more or fewer contributions, etc.

    What I am trying to assert here is that it is undisputed that Ada (unless the new evidence arises) left *the very first demonstration* of what this seemingly imaginary machine, which didn't even physically exist, was capable of through her program. Because Babbage designed the engine itself, that doesn't automatically put him in the position of a programmer (despite Babbage being a brilliant engineer/scientist and may have had a simple or detailed program in his mind). However, it was Ada who gave a definite touch to programming concepts that ultimately led to modern-day programming. Ada deserves more recognition than a mere "tutorial writer," and she is certainly entitled to the title she deserves.

    Other than that, like the previous edition, this book is a must-read for people who are from related/unrelated fields. I always loved the 1st edition, and I would do too with the 2nd. Still, I think history should always be approached with more care, particularly if matters have potential controversies.
    45 people found this helpful
    Report
  • Reviewed in the United States on December 28, 2024
    Genuine must read for anyone interested in the world of computing. Specially aspiring Computer Engineers and scientists. If you have an aspiring CS/CE major around, I would highly recommend getting them this book.
    4 people found this helpful
    Report

Top reviews from other countries

  • Nelshua Da Valentosta Deapes
    5.0 out of 5 stars Best First Step in Understanding Computers
    Reviewed in Canada on February 16, 2025
    This is an absolutely amazing book which can teach anyone, not just tech-savvy people, the fundamentals on how computers work. I recommend this as the absolute first step in anyone's journey to understanding computer architecture.
  • David
    5.0 out of 5 stars Code
    Reviewed in Singapore on April 12, 2024
    Good concise write up on how hardware and software interact inside an Intel 8080 cpu.
  • Vikram
    5.0 out of 5 stars Great book for software developers
    Reviewed in Germany on April 15, 2025
    Very well written book
  • Cliente Amazon
    5.0 out of 5 stars Loved it, for adults and not
    Reviewed in Italy on March 4, 2025
    Loved it. Easy, funny way to learn more about these topics. An excellent read for younger people too.
  • Eduardo Hiroshi Nakamura
    5.0 out of 5 stars Excelente
    Reviewed in Brazil on May 20, 2024
    Excelente