MyLeoNes™

How computers represent information — Computing, 14–17 years

Computers store numbers, text, images and sound as patterns of bits. Understanding binary explains why many different kinds of information can live inside the same machine.

Bits and patterns

A bit has only two possible states, usually written as 0 or 1. By joining many bits in an agreed pattern, a computer can represent a number, a letter, a colour or a sound, even though it only switches tiny electronic states.

Why use two states?

Early electronic machines needed a dependable way to tell two conditions apart: current or no current, magnetised or not. Binary fits this problem because two states are easier to detect reliably than many delicate levels, so the same simple idea can be built into circuits everywhere.

Reading 13 in binary

Use four places with values 8, 4, 2 and 1. For 13, choose 8, skip 4, choose 2 and choose 1: 8 + 0 + 2 + 1 = 13, so the pattern is 1101. The first 1 means eight is included; the 0 means four is not.

The rightmost place

A common mistake is to read 1010 as ten in the ordinary decimal system and then treat the digits as if they had the same values. The mistake is reasonable because the symbols look familiar; in binary, the places are powers of two, so 1010 means 8 + 2 = 10.

Images are numbers too

A digital image is split into tiny pixels, and each pixel receives numbers for its colour. With enough bits, a photo can show millions of colours; the same principle lets screens store icons, video frames and the image sent by a phone camera.

Keep exploring

Other languages

Loading MyLeoNes™…