kmay89.com — the desk of worlds ← back to the desk
A guided tour, with things to press

Yes or No

The one tiny idea underneath every computer on Earth.

The light is OFF.

Tap it, click it, or press Enter. Everything on this page works with a keyboard too.

That switch can answer exactly one question: yes or no. It sounds like almost nothing. But every photo, song, message, and game you've ever seen on a screen is made of switches like this one — asked very, very clever questions.

Scroll. By the end, you'll know the whole trick.

Part 1

The idea nobody had for 2,000 years

For most of history, logic and math lived in different buildings. Logic was philosophy — arguments, words, Aristotle. Math was numbers. Nobody mixed them, because a sentence being true didn't seem like something you could calculate.

In 1847, a self-taught English school teacher named George Boole tried something that sounds almost childish:

What if TRUE is just the number 1, and FALSE is just the number 0?

Then reasoning stops being words and becomes arithmetic. Try it — set two statements to true or false and watch logic turn into grade-school math:

AND is just multiplication. NOT is just “one minus”. That's Boole's whole move: thinking, done with arithmetic.

Why did nobody think of it earlier? Because it looked like a category error — sentences aren't numbers, everyone “knew” that. And when Boole finally did it, the world mostly shrugged. It was a curiosity with no use. There was no machine that needed to reason.

~350 BC
Aristotle
Logic is words — and stays that way for 2,000 years
1847
George Boole
Logic is math: true = 1, false = 0
1937
Claude Shannon
Logic is circuits: switches can do Boole's math
1945 →
Everyone
Computers. All of them run on Boole.

Boole died in 1864 thinking his idea was a philosophical footnote. It sat on the shelf for 90 years — until a 21-year-old student named Claude Shannon noticed something about electrical switches. That's the next part.

Part 2

Three tiny words: AND, OR, NOT

Shannon's discovery: you don't need a brain to do Boole's math. Wired-up switches do it by themselves. Put two switches in a row, side by side, or backwards — and electricity computes the answer for free. These two buttons control all three circuits below:

AND — switches in a row

AB

OR — switches side by side

AB

NOT — a backwards switch

spring switch: A pushes it OPEN

Notice: no one “computes” anything. The wiring is the logic. Real chips do exactly this with transistors — switches with no moving parts, flipped billions of times per second.

Your play, written down

Every combination of A and B you try fills in a row.

ABA AND BA OR BNOT A
offoffoffoffON
offONoffONON
ONoffoffONoff
ONONONONoff

Here's the astonishing part: AND, OR, and NOT are enough. Chain enough of them together and you can build anything computable — arithmetic, memory, video, artificial intelligence. There is no fourth ingredient. Everything below is just these three, stacked.

Part 3

Why electricity loves yes/no

A wire never carries an exact voltage. Heat, nearby wires, even cosmic rays constantly jiggle it. So here's the engineering question that decided the future: how many different meanings can one wire safely carry?

Below, two wires try to send messages. The left wire uses ten voltage levels (one per decimal digit). The right wire uses two (yes/no). Both suffer the same noise. Drag the slider and watch which one breaks first:


10 levels (decimal)

2 levels (binary)

Each moment, a random message is sent down both wires. A message is misread when noise pushes it closer to a wrong level.

That's the real reason computers are binary. Not because engineers love 0 and 1 — because a two-level signal is almost impossible to fool. Better still, it can be cleaned: any signal above the middle snaps back to a perfect “yes”, anything below to a perfect “no”.

“Digital” doesn't mean electronic. It means restorable. A copy of a copy of a copy is still perfect — you'll see why that matters in Part 7.

Part 4

But can yes/no count?

A single switch says yes or no. But give each switch in a row a value — 1, 2, 4, 8, doubling each time — and “which switches are on” becomes a number. Try to make your age:

= 0

Eight switches — one “byte” — can make any number from 0 to 255. Thirty-two of them: over 4 billion. This is all a number is, inside any computer.

And here's where Parts 1–3 snap together. Addition itself is made of AND and OR gates — the “carry the one” from school is an AND gate. Set two numbers; wires do the rest:

first number: 0
second number: 0
sum: 0

0 + 0 = 0

In the ones place right now: sum-light = (A OR B) AND NOT (A AND B) · carry = A AND B. Your phone's chip has billions of these gates and runs them billions of times a second. That's the whole magic: trivial logic, unthinkable speed.

Part 5

This is what code is

Programmers don't wire switches by hand. They write questions, and every question boils down to a yes/no. A comparison is a switch:


      

And Boole's AND / OR / NOT show up in code as && / || / !. Flip the world; watch the program choose a path:


    

That's genuinely all software is: mountains of yes/no questions, answered by switch-circuits, millions of layers deep, so fast it looks like thought. Your thumb scrolling this page is being turned into booleans right now.

Part 6

The roads not taken

Binary wasn't automatic — real machines tried other bases. ENIAC (1945) counted in decimal, like humans. The Soviet Setun (1958) used three-valued logic: yes / no / maybe. Why did they lose? Count the hardware yourself:

0

Decimal (ENIAC's way)

tens
ones

20 lamps — and each must tell 10 voltage levels apart

Binary

7 lamps — each only needs to tell 2 apart

Same number, both sides. Decimal needs ~3× the parts, and every part is 5× easier to fool (you saw that in Part 3). Fewer parts × harder to fool: binary wins twice. ENIAC's own designers switched to binary for the very next machine and no one ever went back.

The other alternative wasn't a different base at all — it was refusing to use steps entirely. That road is called analog, and it's next.

Part 7

So what's “analog”?

Analog means smooth. No steps, no levels — a quantity just is some amount, like a dimmer knob or the position of a violin string. One slider, two philosophies:


Analog bulb

infinitely many possible brightnesses

Digital bulb (3 switches)

only 8 possible brightnesses
stored as 101

The analog side is more faithful — it captures every shade. The world itself is analog: sound, light, temperature. So why did digital take over? Because of what happens when you copy…

The copy machine

The same sound wave, stored two ways. Every copy adds a little noise to both.

analog (like a cassette tape)
digital (stored as steps)

Original recording

The digital side gets the same noise — but because its values snap back to the nearest step, the noise is erased at every copy. That “snap” is Part 3's two-level trick. It's why a 40-year-old CD sounds new and a 40-year-old cassette hisses.

Analog computers were real and brilliant — machines of gears and voltages predicted tides and aimed telescopes. But their errors accumulated, step after step, copy after copy. Digital trades a little smoothness for something priceless: perfection that lasts.

Part 8

Analog → Digital → Quantum

So is yes/no the end of the story? Almost. There's one more kind of switch — the strangest one physics allows. A qubit isn't a dimmer stuck between yes and no. Before you look at it, it genuinely holds a blend of both. The moment you measure, it snaps to one answer — with odds set by the blend:


No measurements yet.

Every single measurement is still a plain 0 or 1 — Boole survives! The blend only shows up in the pattern. Moving the slider resets the qubit.

Why is that powerful? Because blends can interfere — like waves. A quantum computer choreographs its qubits so the paths leading to wrong answers cancel each other out, and only right answers survive the measurement. Cancel a wave yourself:


Two waves (thin lines) and their sum (thick line). At a half-step shift they erase each other. Quantum algorithms do this to possibilities: wrong answers arrive out of phase and vanish.

Analog

A quantity IS an amount.

Smooth, natural, instant

Every step and every copy adds error — forever

Digital

A quantity is yes/no switches.

Self-cleaning, perfectly copyable, absurdly fast

Checks possibilities mostly one at a time

Quantum

A switch holds a blend until you look.

Wrong answers can cancel themselves out

Blends are fragile — a stray nudge destroys them

Notice the shape of the story: analog was rich but fragile; digital gave up richness for reliability and conquered the world; quantum tries to win the richness back without losing Boole — every quantum answer still comes out as good old 0s and 1s. It won't replace your laptop; it's a new floor on the same building.

The end — which is the beginning

Back to the switch

Same switch as the top of the page. But now you know:

a schoolteacher turned truth into arithmetic · a student noticed switches could do that arithmetic · two levels beat ten because noise is real · doubling values made switches count · every line of code is these switches asking questions · analog lost because errors pile up · and quantum is teaching the humble yes/no to hold a maybe.

Yes or no. That's the whole trick. Now you're in on it.