Data and Binary: How Computers Store Information
Binary
Computers use only two digits, 0 and 1. This is called binary. They use it because an electronic switch can easily be off (0) or on (1).
A single 0 or 1 is a bit (short for binary digit). 8 bits make 1 byte.
Counting in Binary
In our normal system each column is worth ten times the one before. In binary, each column is worth double the one before: 8, 4, 2, 1.
| Number | 8 | 4 | 2 | 1 |
|---|---|---|---|---|
| 1 | 0 | 0 | 0 | 1 |
| 2 | 0 | 0 | 1 | 0 |
| 5 | 0 | 1 | 0 | 1 |
| 6 | 0 | 1 | 1 | 0 |
| 8 | 1 | 0 | 0 | 0 |
| 15 | 1 | 1 | 1 | 1 |
To read 101, add the column values where there is a 1: 4 + 1 = 5. The binary number 110 is 4 + 2 = 6.
With 8 bits (one byte) you can make 256 different values, from 0 to 255.
Pictures
A picture on a screen is made of tiny coloured squares called pixels. Each pixel's colour is stored as a number. More pixels mean a sharper picture.
Text
Each letter has a number code, for example the capital letter A is 65 in a common code called ASCII. The computer stores that number in binary.
Sound
Sound is stored by measuring the sound wave many times a second and storing each measurement as a number.
File Sizes
We measure file sizes in bytes: a kilobyte (KB) is about 1,000 bytes, a megabyte (MB) about a million bytes and a gigabyte (GB) about a billion bytes. Photos and videos use a lot of storage.
Curriculum link: National Curriculum in England: Computing programmes of study (DfE) — Aims: understand the fundamental principles and concepts of computer science, including abstraction, logic, algorithms and data representation