I learned the wrong thing
In the previous article, we answered why binary exists: physics favors two stable states. This article asks a different question. Once you accept that the machine only knows on and off, how should a human actually read it?
Every computer science student eventually learns how to convert decimal to binary. Then they forget it. Not because binary is hard. Because they learned an algorithm instead of building a mental model.
The gap between "I know how to convert" and "I look at 11110000 and immediately see 240" is enormous. This article is about closing it.
Two ways of thinking
There are two ways to get from a number to binary. One is what schools teach. The other is what engineers use.
Works. Slow. Easy to forget.
Fast. Sticky. What you'll use in the field.
When you're reading a binary value, the problem is almost always decoding what's already there, not building it from decimal. Schools teach Method 1 first. We're starting with Method 2 on purpose. Learn in the order you'll use it.
Binary is positional
There's no magic. Binary works exactly like decimal. Each digit position carries a weight based on the base raised to a power.
Decimal · 572We're using 8 bits in every example. Why eight specifically? That's the next article.
The only numbers you need to memorize
Don't memorize binary numbers. Memorize powers of two. Eight values. That's the entire toolkit.
| Bit pattern | Power | Decimal |
|---|---|---|
10000000 | 2⁷ | 128 |
01000000 | 2⁶ | 64 |
00100000 | 2⁵ | 32 |
00010000 | 2⁴ | 16 |
00001000 | 2³ | 8 |
00000100 | 2² | 4 |
00000010 | 2¹ | 2 |
00000001 | 2⁰ | 1 |
Notice the pattern: each row is half the value of the one above it. Once these eight numbers feel familiar, every 8-bit value becomes readable.
Sometimes curiosity leads to beautiful detours. These sections are completely optional. Skip them if you just want the main idea, or follow the rabbit if you enjoy exploring deeper connections.
Look at the table again. Every row has exactly one bit set. One switch on, seven off.
If you've studied Linear Algebra, that table might look like something you already know. Stack those eight rows and you get the 8×8 identity matrix. Each row is a standard basis vector in ℝ⁸. Each weight column (128, 64, 32, …, 1) is that basis vector scaled to its decimal value.
Any 8-bit pattern is a vector of coefficients, each one 0 or 1:
Pair it with the weight vector:
The decimal value is the dot product v · w. You're not adding digits. You're selecting basis directions and scaling them. A set bit means "include this basis vector." A cleared bit means "skip it."
One more thing. There are only 256 possible bytes. Eight switches give you eight dimensions, but coefficients are locked to 0 or 1. You don't move freely through ℝ⁸. You visit the corners of an 8-dimensional hypercube. Every byte you will ever read is one of those 256 corners.
Don't worry if this doesn't make sense yet. You don't need Linear Algebra to read binary. I just thought it was too beautiful not to mention right here, while the table is still in front of you.
Think LEGO
Each bit that's turned on is a block you snap into place. Reading binary means spotting which blocks are present and adding their weights.
10010110
11110000
10101010
You're not adding bits. You're selecting weights.
Follow the switches
In the first article, every bit was a physical switch: ON or OFF. Here we use that literally. Each position in an 8-bit byte is one switch, and each switch carries a fixed weight.
Reading binary means walking the switches left to right and adding the weights of every switch that's ON.
Building a number works the same way, in reverse. You start with a target and walk the switches from heaviest to lightest. If the weight fits in what's still needed, flip the switch ON. If it doesn't, leave it OFF.
Same switches. Same weights. Reading adds them up. Building decides which ones to flip. The LEGO blocks from the previous section are just the switches that ended up ON.
Why your brain can learn this
You don't read the word CAT by sounding out C-A-T letter by letter. You recognize the shape. After enough exposure, binary works the same way.
After enough exposure, common patterns become instant. When you see 11111111, you don't calculate eight additions. You recognize: every switch on, maximum value for one byte. 255.
Pattern recognition is faster than calculation. The goal isn't to become a human calculator. It's to build enough familiarity that common patterns become instant.
Mental shortcuts
Before the shortcuts feel like magic, understand why they work. 11111111 means every weight is selected: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. All bits on equals the maximum. All bits off equals zero. Everything else is a subset.
These aren't tricks to memorize in isolation. They're patterns worth recognizing on sight. The more you see them, the faster you read them.
Building blocks in reverse
Reading binary is the primary skill. But once you've walked the switches a few times, the reverse direction stops feeling like a separate algorithm.
Ask one question per switch, largest weight first: does this fit in what's still needed? If yes, flip it ON and subtract. If no, leave it OFF and move on. The switch walkthrough above is the entire method.
Method 1 from the beginning (divide by 2, save remainder, repeat) produces the same result. But you'll rarely need it once the switches make sense.
Practice
Eight exercises. Each one targets a single skill. Try them before looking at the answers.
What is 10010001 in decimal?
What is 11110000 in decimal?
What is 10101010 in decimal?
Represent 42 in 8-bit binary.
Represent 150 in 8-bit binary.
Represent 213 in 8-bit binary.
11111111 is 255. Turn off the 128 switch. What's the new decimal value?
Turn on only the 32, 8, and 1 switches. What binary pattern and decimal value do you get?
01111111)Mental model
Binary is a conversion algorithm.
Binary is a collection of weighted switches.
Three sentences to keep
Don't convert. Recognize.
Every bit is a switch carrying a weight.
You're not adding bits. You're selecting weights.
Further reading
- Why Binary Won? The first essay in this series.
- Charles Petzold, Code. Chapter 9 covers binary and positional notation from first principles.
There are only 10 types of people in the world.
If you just smiled, you got it.
What's next
We can now read binary. The next question in the series: why group switches in eights?