Why this matters
A computer cannot store a temperature, a song, or a photo the way you see it. Everything inside it is just two states: on or off, 1 or 0. Before you can understand how sound or images are stored, you need the idea that any information can be turned into numbers, and that those numbers are written in base two. This lesson is the foundation for the whole chapter.
The idea
Analog data changes smoothly, like the height of mercury in a thermometer. Digital data takes those smooth values and chops them into regular steps written as numbers. Turning analog into digital is A/D conversion (digitization); going back is D/A conversion. Digital data has real advantages: you can copy it without it getting worse, edit it easily, and mix text, sound, and pictures together.
Computers store everything in binary, base two, using only 0 and 1. The smallest unit is a bit (one 0 or 1). With n bits you can tell apart 2ⁿ things: 1 bit gives 2, 2 bits give 4, 3 bits give 8, and 8 bits give 256. Eight bits make one byte (B). Bigger units climb in steps of 2¹⁰ = 1,024: 1 KB = 1,024 B, 1 MB = 1,024 KB, and so on.
To read a binary number in decimal, give each digit a place value of 1, 2, 4, 8, … from the right and add up the ones. To write a decimal number in binary, keep dividing by 2 and read the remainders bottom-to-top.
Because long strings of 0s and 1s are hard for people, we also use hexadecimal (base 16), which uses 0-9 then A-F. The handy part: every group of 4 bits is exactly one hex digit, so binary and hex convert at a glance.
Picture it
flowchart LR A[Analog: smooth signal] -->|A/D conversion| D[Digital: numbers] D -->|written in| B[Binary 0 and 1] B -->|group every 4 bits| H[Hexadecimal 0-9 A-F] D -->|D/A conversion| A
Worked example
Convert binary 1011 to decimal. The place values from the right are 1, 2, 4, 8:
1×1 + 1×2 + 0×4 + 1×8 = 1 + 2 + 0 + 8 = 11.
Now go the other way and group it for hex. The binary 10011010 splits into 4-bit chunks 1001 1010. The chunk 1001 is 9, and 1010 is 10 = A, so 10011010₂ = 9A in hexadecimal.
Your turn
Try the practice: convert a few binary numbers to decimal, sort examples into analog vs digital, and match each unit (bit, byte, KB) to what it means.
Recap
- Analog = smooth; digital = stepped numbers. A/D conversion digitizes data.
- A bit is one 0/1; n bits give 2ⁿ values; 8 bits = 1 byte; units grow ×1,024.
- Read binary with place values 1, 2, 4, 8, …; every 4 bits is one hex digit.