~10 min read · Binary · Mental Models · Fundamentals

Think in Binary

Stop converting. Start recognizing.

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.

How do experienced engineers read binary almost instantly?

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.

Method 1 · The algorithm
Decimal → binary
150 ↓ divide by 2 ↓ save remainder ↓ repeat

Works. Slow. Easy to forget.

Method 2 · The model
Binary → decimal
10010110 ↓ 128 + 16 + 4 + 2 ↓ 150

Fast. Sticky. What you'll use in the field.

Which one would you rather do in your head?

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 · 572
572 = 5×10² + 7×10¹ + 2×10⁰ = 500 + 70 + 2 = 572
Binary · 10010110
10010110 = 1×2⁷ + 0×2⁶ + 0×2⁵ + 1×2⁴ + 0×2³ + 1×2² + 1×2¹ + 0×2⁰ = 128 + 0 + 0 + 16 + 0 + 4 + 2 + 0 = 150
Same idea. Different base.

We'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 patternPowerDecimal
100000002⁷128
010000002⁶64
001000002⁵32
000100002⁴16
000010002³8
000001002²4
000000102¹2
000000012⁰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:

10010110 → (1, 0, 0, 1, 0, 1, 1, 0)

Pair it with the weight vector:

w = (128, 64, 32, 16, 8, 4, 2, 1)

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

128 16 4 2 → 150

11110000

128 64 32 16 → 240

10101010

128 32 8 2 → 170

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.

Reading · 10010110 → ?
1 128 ON Switch is on. 128 enters the total. Running sum: 128
0 64 OFF Switch is off. 64 does not enter. Running sum: 128
0 32 OFF Switch is off. 32 does not enter. Running sum: 128
1 16 ON Switch is on. 16 enters the total. Running sum: 144
0 8 OFF Switch is off. 8 does not enter. Running sum: 144
1 4 ON Switch is on. 4 enters the total. Running sum: 148
1 2 ON Switch is on. 2 enters the total. Running sum: 150
0 1 OFF Switch is off. 1 does not enter. Running sum: 150
10010110 = 150

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.

Building · 150 → ?
1 128 ON 128 fits in 150. Switch on. Still need: 22
0 64 OFF 64 doesn't fit in 22. Switch off. Still need: 22
0 32 OFF 32 doesn't fit in 22. Switch off. Still need: 22
1 16 ON 16 fits in 22. Switch on. Still need: 6
0 8 OFF 8 doesn't fit in 6. Switch off. Still need: 6
1 4 ON 4 fits in 6. Switch on. Still need: 2
1 2 ON 2 fits in 2. Switch on. Still need: 0
0 1 OFF Nothing left to form. Switch off. Done.
150 = 10010110

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.

11111111
255
All weights selected
10000000
128
Highest bit only
01111111
127
All except highest
00001111
15
Lower half only
11110000
240
Upper half only
10101010
170
Every other bit

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.

Read binary → decimal
Skill · Pick sparse weights

What is 10010001 in decimal?

Skill · Recognize a block of ON switches

What is 11110000 in decimal?

Skill · Spot an alternating pattern

What is 10101010 in decimal?

Build decimal → binary
Skill · Decompose a small number

Represent 42 in 8-bit binary.

Skill · Combine multiple weights

Represent 150 in 8-bit binary.

Skill · Work through a larger value

Represent 213 in 8-bit binary.

Think with switches
Skill · Flip one switch off

11111111 is 255. Turn off the 128 switch. What's the new decimal value?

Skill · Pick specific weights

Turn on only the 32, 8, and 1 switches. What binary pattern and decimal value do you get?

10010001 = 128 + 16 + 1 = 145
11110000 = 128 + 64 + 32 + 16 = 240
10101010 = 128 + 32 + 8 + 2 = 170
42 = 32 + 8 + 2 = 00101010
150 = 128 + 16 + 4 + 2 = 10010110
213 = 128 + 64 + 16 + 4 + 1 = 11010101
11111111, 128 switch off → 127 (01111111)
32 + 8 + 1 → 00101001 = 41

Mental model

Before

Binary is a conversion algorithm.

After

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

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?

If switches can be grouped in any quantity, why did eight become the standard?
Discussion

Questions? Different shortcuts you use?