The Bar Code

Our numbering system consists of 10 digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) with which we can write any number. This system is called decimal base. We can demonstrate any number by applying powers of base 10. Look:
47 621 = 4 x 104 + 7 x 10³ + 6 x 10² + 2 x 10¹ + 1 x 100
In the binary system (base 2), numbers are written using 0 and 1 and powers of 2.
Look:
21(base 10) = 10101(base 2)
Transforming the number in base 2 to base 10. Watch:
10101(base 2) = 1 x 24 + 0 x 2³ + 1 x 2² + 0 x 2¹ + 1 x 20 (according to the position of 0 and 1 we raise base 2 to the proper exponent)

10101 Base 2
1 Position 4: 24
0 Position 3: 2³
1 Position 2: 2²
0 Position 1: 2¹
1 Position 0: 20

1 x 24 + 0 x 2³ + 1 x 2² + 0 x 2¹ + 1 x 20
16 + 0 + 4 + 0 + 1
21
In the barcode, the black bar means 1 and the white one means 0. The number 10100001101, in base 2 is a simplified barcode.
The prices of products in commerce shown in barcode are more complex, but we can establish the barcode below in base 10.

10100001101base2 = 1 x 210 + 0 x 2

9 + 1 x 28 + 0 x 27 + 0 x 26 + 0 x 25 + 0 x 24 + 1 x 2³ + 1 x 2² + 0 x 2¹ + 1 x 20
1 x 1024 + 0 x 512 + 1 x 256 + 0 x 128 + 0 x 64 + 0 x 32 + 0 x 16 + 1 x 8 + 1 x 4 + 0 x 2 + 1 x 1 
1024 + 0 + 256 + 0 + 0 + 0 + 0 + 8 + 4 + 0 + 1 
1293
The number 1293 is the code for a particular product. The cashier's barcode reader optically scans the codes and in fractions of seconds performs the calculations, reaching the number 1293. Accessing a list of products, look for which was registered with this number, recording the value on the coupon.

by Mark Noah
Graduated in Mathematics
Brazil School Team

Curiosities - Brazil School

Source: Brazil School - https://brasilescola.uol.com.br/curiosidades/o-codigo-barras.htm

Barbie invaded Crocs! Discover the new collection inspired by the film

Barbie invaded Crocs! Discover the new collection inspired by the film

The live action of Barbie, which is being widely publicized by Mattel and Warner Bros., is approa...

read more
Secret tunnel discovered in the Pyramid of Giza; Know details

Secret tunnel discovered in the Pyramid of Giza; Know details

Over the years, numerous archaeologists have made numerous discoveries that have helped expand ou...

read more

Anxiety relief: Meditate at work with these 6 strategies

A meditation it is a moment that allows you to reconnect. For some people, lack of time is a just...

read more