How does a barcode scanner work?

A barcode scanner reads numbers on a barcode by using light and patterns that look like a striped candy bar.

Imagine you have a candy bar with black and white stripes, the more stripes, the more numbers it holds. A barcode scanner works just like someone tasting each stripe of this candy bar one by one.

How It Sees the Stripes

The scanner shines a light on the barcode, like a flashlight. The light bounces off the white stripes, and most of it goes back to the scanner. But the black stripes absorb the light, so very little comes back.

The scanner is really good at seeing how much light returns. When it sees more light, it knows it’s looking at a white stripe. When it sees less light, it knows it's looking at a black stripe.

How It Turns Stripes into Numbers

Each pair of black and white stripes makes a little number. The scanner reads all these numbers quickly, like how you count the steps as you climb up stairs, and then tells the computer what item you're scanning, like a soda can or a toaster.

Take the quiz →

Examples

  1. A barcode scanner reads a grocery item's code like a detective solving a mystery.
  2. A barcode scanner uses light to read numbers on a box at the store.
  3. The scanner sees lines and spaces as a secret message.

Ask a question

See also

Discussion

Recent activity

Categories: Science · barcode· scanner· technology