On and off: bits and bytes

Knowledge Videos

Short animated explainers, organised by subject.

On and off: bits and bytes

A bit is one on/off switch, a byte is eight bits, and binary is counting with them. How ASCII turns letters and everything else into 0s and 1s.

Try it

Transcript

A computer only understands two things: on and off. One tiny switch that is either on or off is called a bit.

Off means zero, and on means one. So a bit is always a zero or a one.

Line up eight bits, and you get a byte.

Eight switches can make two hundred and fifty six different patterns. That's plenty to give every letter, number and symbol its own pattern.

Binary is counting with switches. Each switch is worth double the one next to it: one, two, four, eight.

To make the number five, switch on the four and the one. In binary, five is zero, one, zero, one.

But which pattern means which letter? Everyone agreed to use one table. It is called ask-ee.

Ask-ee gives every character a number. A is sixty five. B is sixty six. Lowercase a is ninety seven. Even the space has a number: thirty two.

The computer stores that number in binary. So the letter A, sixty five, is zero, one, zero, zero, zero, zero, zero, one.

Photos, music and games work the same way. Everything on a computer is made of bits.

Remember: a bit is one switch, a byte is eight bits, binary is counting with them, and ask-ee is the table that turns letters into numbers.

More in this series