Analog and digital: two ways to hold a quantity
A clock with hands is analog: the hand moves smoothly and can point between two marks. A clock with digits is digital: it shows one separate number at a time. The mercury in an old thermometer rises smoothly (analog); a digital thermometer shows a number such as 36.6. Computers work with digital values because their circuits have two clear states, on and off, and two states are easy to tell apart even when there is noise. We write the two states as 0 and 1. One binary digit is a bit; a group of 8 bits is a byte. How many different values can n bits show? Each extra bit doubles the number: 1 bit gives 2 values, 2 bits give 4, 3 bits give 8, and n bits give 2ⁿ values, from 0 up to 2ⁿ − 1. So 8 bits give 256 values (0 to 255) and 16 bits give 65,536. Sizes are counted in bytes. In storage, we use 1 KB = 1,024 bytes in this lesson. A text of 2,048 characters, one byte each, needs 2,048 bytes = 2 KB.
| Bits n | Different values 2ⁿ | Range |
|---|---|---|
| 1 | 2 | 0 to 1 |
| 2 | 4 | 0 to 3 |
| 3 | 8 | 0 to 7 |
| 4 | 16 | 0 to 15 |
| 8 | 256 | 0 to 255 |
| 16 | 65,536 | 0 to 65,535 |
| Bits | State |
|---|---|
| 00 | stop |
| 01 | get ready |
| 10 | go |
| 11 | flashing |
List five things around you that are analog and five that are digital (a ruler, a stopwatch, a score board, and so on). For each digital item write what its separate steps are. Then work out by doubling how many values 5 bits can show.