MyLeoNes™

Barcodes are codes computers can read — Computing, 4–6

A barcode turns a thing into a pattern of lines that a scanner can recognise. You meet this when an adult buys food or a library checks a book.

A pattern can stand for a thing

Look at the stripes on a cereal box. To your eyes they are just dark and light lines, but a scanner turns that pattern into information about the product. The computer can then find its name or price without a person typing it.

Why use stripes instead of typing?

Shops may have thousands of different things. Typing every name and price would take time and could cause mistakes, so a short pattern gives the computer a quick way to look up the right record. The barcode does not need to contain the whole story; it can point to it.

Scanning one box

Imagine a box with the number 5012345678900 in its barcode. First, the scanner shines light on the stripes. Next, it notices which parts reflect light and which parts look dark, and turns that pattern into the number. Finally, the shop computer looks up that number and shows “apple juice, €2”.

A barcode is not a picture of the price

It is reasonable to think the longer or thicker stripes must show a higher price. They look a bit like a secret picture, after all. Usually, the barcode gives an identifying number, while a shop’s computer stores the current price separately; the same product can therefore have different prices in different places.

Where you meet barcodes

You can find barcodes on food, toys, medicine boxes and library books. A checkout scanner uses one to bring up a product, while a library scanner uses one to identify a book. They are useful when many objects need quick, reliable names.

Keep exploring

Other languages

Loading MyLeoNes™…