Binary
Computers are, at heart, oceans of tiny switches — each either on or off. Everything a machine does, including holding your Bitcoin, is built from just two symbols: 1 and 0. That’s binary.
Why only two?
We count in base 10 — ten digits, 0 to 9 — probably because we have ten fingers. Computers count in base 2 because their fingers are electrical: a wire carrying voltage (on = 1) or not (off = 0). Two clean states are easy to build, easy to tell apart, and hard to get wrong. Everything else is a matter of stringing enough switches together.
Counting with switches
In base 10, each place is a power of ten: units, tens, hundreds. In binary, each place is a power of two: 1, 2, 4, 8, 16, 32… To read a binary number, add up the place-values wherever there’s a 1:
1= 110= 2101= 4 + 1 = 51101= 8 + 4 + 1 = 13
Turning letters into numbers
If computers only understand numbers, how do they store text? By agreeing on a code. In ASCII, every character has a number — “A” is 65, “a” is 97, a space is 32 — and that number is stored in binary. Type something below and watch it become the 1s and 0s a computer actually holds.
Each character becomes 8 bits (one byte). Hover a byte to see the character and its number.
This is the profound trick underneath everything digital: with a shared code, a string of 1s and 0s can represent a letter, a photo, a song — or a signature proving you own some money. The next lesson bundles these bits into the units computers actually work with.
Spotted an error or have feedback on this lesson? Suggest a correction ↗
Comments
Powered by Nostr — reply from any Nostr client, and zap the lesson over Lightning.