Two machines. Both run on nothing but electricity and tiny switches. One gives you an exact answer, the other gives you its best guess. Let's open both up and see the gears turn โ with flowcharts, diagrams and worked examples.
A calculator has zero understanding of math. It doesn't "know" that 2+2 is 4. It's just a maze of electric switches wired so cleverly that the right answer falls out the other end.
Figure 1 โ A calculator is a one-way assembly line. Input โ convert to binary โ compute โ convert back โ show.
Computers can't store the number "5" directly. They only have switches, and a switch is either ON = 1 or OFF = 0. So we count in binary (base-2) instead of the decimal (base-10) we use.
Just like decimal columns are 1000/100/10/1, binary columns are 8/4/2/1. Turn on the 4 and the 1 โ that's 5.
Switches are wired into tiny decision-makers called logic gates. Give them ON/OFF inputs, they give one ON/OFF output. These are the only "thinking" a calculator does.
Think of AND as "I'll go only if both my friends come." OR is "I'll go if anyone comes." XOR is "I'll go only if exactly one comes."
Here's the magic. The calculator adds like you do โ column by column, right to left, carrying the 1 โ except each column is just two gates: an XOR gives the digit, an AND gives the carry. This little circuit is called a full adder.
Figure 2 โ Chain 4 of these full-adders together and you can add any two 4-bit numbers. Chain 64 and you get a real computer's adder.
๐ก Key idea: the calculator never "figured out" that 5+3=8. The gates were wired so that ON/OFF signals flow through and the pattern 1000 lights up. The answer was built into the wiring.
Press a key and a signal races through the calculator's blocks โ Encoder โ Controller โ RAM / ROM โ ALU โ Display Decoder โ screen. Here's 1 + 3 = 4, step by step.
Press โถ Play to watch 1 + 3 travel through the calculator.
Numbers โ binary โ logic gates wired to compute โ binary โ screen. It's fast, it's exact, it's the same every single time, and it holds no memory of the world. A brilliant idiot that never makes an arithmetic mistake.
An LLM (Large Language Model, like the one writing this) doesn't calculate answers โ it predicts the next word. A GPU is the muscle: the chip that does the billions of tiny multiplications fast enough to make that prediction feel instant.
Figure 3 โ Unlike the calculator's one-way line, an LLM loops: it generates one word, adds it back, and predicts again.
Models can't read letters โ only numbers. So text is chopped into tokens (whole words or word-pieces), and each token is swapped for an ID number.
Then each ID becomes an embedding โ a long list of numbers (say 12,000 of them) that captures the word's "meaning." Words with similar meaning get similar lists, so "cat" sits near "kitten."
Before guessing the next word, the model uses attention to weigh which earlier words matter most. In "The cat sat on the ___", it pays high attention to cat and sat, so it expects a place a cat sits.
Attention is what lets the model handle long sentences and stay on-topic โ it's the big idea behind the "Transformer," the T in GPT.
After all that math, the model outputs a probability for every possible next word. Then it picks one โ usually a likely one, but with a dash of randomness so it isn't robotic. That randomness is why the same prompt can give different answers.
๐ก Key idea: the model never looked up a fact. It learned, from reading billions of sentences, that "mat" tends to follow "the cat sat on the." It's pattern-matching at an unimaginable scale, not knowing.
Every prediction is really one giant pile of multiply-then-add operations (matrix multiplication) across billions of learned numbers called weights or parameters. A regular CPU does these one after another. A GPU does thousands at the exact same time.
Figure 4 โ Same silicon idea (transistors + gates), opposite philosophy: few powerful workers vs. an army of simple ones.
These GPUs are also exactly the chips that render video-game graphics โ because drawing millions of pixels is also "do simple math a zillion times at once." That's the happy accident that made the AI boom possible.
Words โ tokens โ embeddings โ attention + billions of multiply-adds (on a GPU) โ probabilities โ pick a word โ repeat. It's a fluent, creative pattern-matcher that learned from oceans of text โ and unlike the calculator, it can be wrong, surprising, or different every time.
Figure 5 โ Both are "just math on switches." What changes is the scale and the goal.
| Question | ๐งฎ Calculator | ๐ค LLM + GPU |
|---|---|---|
| What's its job? | Compute exact math | Predict likely text |
| How does it "decide"? | Fixed wiring of logic gates | Billions of learned weights |
| Same input, same output? | Always identical | Can differ (randomness) |
| Can it be "wrong"? | Basically never | Yes โ it can hallucinate |
| Where's the knowledge? | Nowhere โ just rules | Baked in from training data |
| Core math operation | Binary add / logic (XOR, AND) | Matrix multiply (ร then +) |
| Hardware | Tiny chip, thousands of gates | GPUs, thousands of cores |
| How much data flows? | A handful of bits | Trillions of operations per word |
| Best real-world metaphor | A vending machine | A well-read storyteller |
Zoom all the way in and a calculator and an AI are the same thing: patterns of tiny on/off switches. The jaw-dropping difference is only scale and purpose.
A few thousand switches, hand-wired by an engineer to give one exact, certain answer. It's a perfect rule-follower with no idea what numbers even are.
Billions of switches whose settings were learned, not wired, running on GPUs, producing a fluent best guess. Same building blocks โ but so many, arranged so cleverly, that language falls out.