Code The Hidden Language of Computer
A Journey into the Heart of Computers
Code: The Hidden Language of Computer Hardware and Software is a famous book by Charles Petzold that explains how computers work in a very friendly way. Instead of starting with complicated technical words, the author uses simple everyday examples like flashlights, telegraphs, and Morse code to show how information can be represented and sent. Petzold’s main goal is to help readers understand that computers are not magic; they are machines built using simple rules of logic and communication.
This book is for anyone curious about the secret “language” inside computers — the set of signals, codes, and instructions that tell machines what to do. Even if you know nothing about programming or electronics, the way Petzold explains things makes the world of computers feel less mysterious.
The Concept of Communication and Codes
How People and Machines Talk
At the start, Petzold explains that before computers, people were already using “codes” to communicate. For example, Morse code uses dots and dashes to send messages over long distances. He also talks about light signals, flags, and other creative ways humans have communicated without speaking.
The key idea is that a code is a system for representing information in a way that can be sent and understood. Just like people can create a code for secret messages, computers use their own special codes to store and process information.
This section makes it clear that the basic building block of computer communication is the idea of representing information with only two states — like “on” and “off,” “yes” and “no,” or “1” and “0.” This binary thinking is the foundation of computer language.
Binary Numbers – The Language of Machines
Why Computers Love 1 and 0
Petzold introduces binary numbers, which are made up of only two symbols: 1 and 0. He shows that even though binary looks simple, it can represent any number, letter, or symbol.
• The decimal number 5 is written in binary as 101.
• Letters can also be turned into binary using systems like ASCII.
Computers use binary because it matches how electronic components work. An electric signal can either be present (1) or absent (0), and this makes it easy for machines to store and read data without confusion.
Petzold explains this in a very visual way, using switches, light bulbs, and diagrams to make binary numbers feel logical and not scary.
From Telegraphs to Electrical Circuits
The First Steps Toward Computers
The book connects the history of communication technology with the invention of computers. Petzold talks about telegraphs, which were among the first devices to send coded messages over wires.
Telegraphs worked by sending electrical pulses, which could be short or long (dots and dashes). This idea of using electricity to send information eventually led to the creation of electrical switches and relays — the building blocks of early computers.
By showing how a telegraph operator and a computer are similar (both turn signals into meaningful information), Petzold helps the reader see how old technologies shaped modern ones.
Logic Gates – The Brains of the Machine
How Simple Circuits Make Decisions
One of the most important sections of the book explains logic gates — small electronic circuits that perform basic logical operations like AND, OR, and NOT.
• AND gate: Gives output only if both inputs are on (1).
• OR gate: Gives output if at least one input is on (1).
• NOT gate: Flips the signal (1 becomes 0, 0 becomes 1).
When these gates are connected together in clever ways, they can do complex things like math and decision-making. Petzold compares this to combining simple Lego blocks to build an entire city.
Logic gates are the foundation of CPUs, memory, and every part of modern computers.
Building Memory – How Computers Remember
From Switches to Storage
Computers need to remember numbers, instructions, and results — this is where memory comes in. Petzold explains that in the earliest computers, memory was made from simple circuits that could “hold” an electrical signal until it was changed.
For example, a flip-flop circuit can store a single binary bit (1 or 0). By combining many flip-flops, you can store bigger numbers or even text.
He also explains the difference between :
• RAM (Random Access Memory): Temporary memory that loses data when the computer turns off.
• Storage (like hard drives): Long-term memory that keeps data even without power.
This section makes readers appreciate that all computer “memory” is just a huge collection of tiny on/off switches.
The Birth of the Computer Processor
Making Machines Follow Instructions
A computer’s processor (or CPU) is like its brain. Petzold explains that the CPU reads instructions one step at a time, does what they say, and then moves to the next instruction.
These instructions are written in machine code — a series of binary numbers that tell the CPU exactly what to do. Each instruction might :
• Add two numbers
• Move data from one place to another
• Check if something is true and make a decision
By putting many instructions together, you can make programs that do almost anything. Petzold shows how something as simple as turning on a light can be broken down into step-by-step instructions, just like a CPU would do.
High-Level Languages – Speaking to Computers More Easily
From 1s and 0s to Words
While machine code works, it is very hard for humans to read or write. That’s why programmers created high-level programming languages like BASIC, C, and Python. These languages use words and symbols that are easier to understand.
• Machine code might be: 10110000 01100001
• High-level code could be: print("Hello")
The computer still understands only binary, so high-level code is translated by compilers or interpreters into machine code.
Petzold makes the point that all programming languages, no matter how advanced, eventually boil down to the same simple binary instructions.
The Evolution of Computers
From Room-Sized Machines to Smartphones
The book covers the history of how computers have changed over the years. In the beginning, computers were huge machines that filled entire rooms and could only do basic calculations. Over time, thanks to advances in electronics (especially the invention of the transistor and later the microchip), computers became smaller, faster, and cheaper.
Petzold shows how the same basic principles — binary numbers, logic gates, memory, and instructions — are still used today, even in tiny devices like smartphones. The difference is just that modern chips can fit billions of these tiny circuits in a space smaller than your fingernail.
The Hidden Language Around Us
Why This Knowledge Matters
In the final part of the book, Petzold reminds readers that understanding how computers work is like learning a new language — it changes how you see the world. When you know the basics of binary, logic, and coding, you realize that everything from a video game to an online bank transaction is built from simple building blocks.
The “hidden language” of computers is everywhere: in traffic lights, elevators, washing machines, and of course, in our phones and laptops.
By breaking down computers into their simplest parts, Petzold makes it clear that technology is made by humans and can be understood by humans — you just have to start with the basics.
FAQ On Code The Hidden Language of Computer
Code : The Hidden Language of Computer Hardware and Software
It explains how computers work, starting from simple ideas like Morse code and moving up to processors, memory, and programming languages.
Charles Petzold, a well-known writer and teacher of computer science topics.
It means binary code (1s and 0s) — the basic way computers store and process information.
Because electronic circuits can easily detect two states: on (1) and off (0).
Yes, it explains how programming languages work, starting from machine code to high-level languages.
Yes, it talks about telegraphs, early computers, and how technology evolved to modern devices.
Anyone curious about how computers really work — students, beginners, and even professionals who want a clear explanation of the basics.