Binary Code


How do you send information with light?

Since the early days of communication, codes have been used to send information over long distances. Smoke signals, Morse code and semaphore are examples.

To send information using lasers and optic fibres we first use a code of numbers that's understood by a computer. The code uses ordinary numbers to mean a letter in the alphabet, a colour in a picture, a note of music, or whatever you want. For instance, 1 might be ‘a’, 2 might be ‘b’, 3 might be ‘c’ and so on.

We then need to convert them to something that can be understood by a computer. For this we use the binary number system.

The binary system

Binary numbers are used to represent all information in the digital world. They’re similar to our decimal system, which uses the digits 0 to 9, except binary uses only 0 and 1.

Binary is handy because now we can easily use something physical to represent numbers. For instance we could use a laser. When it's on you know it means ‘1’ and when it’s off you know it means ‘0’.

When we write numbers in decimal, it's the position or place of the number that tells us what its real value is. With 246 for example, the 6 at the end is six ones, the 4 in the middle is four tens and the 2 is two hundreds. Each place or position is 10 times greater than the previous position.

The binary number system also uses place to give value, but as we have only 2 numbers to work with each place or position is only 2 times greater than the one before.

In binary code:

  • Decimal number 0 is binary 0
  • Decimal number 1 is binary 1

Now it's different:

  • Decimal number 2 is binary 10 (one two and no ones)
  • Decimal number 3 is binary 11 (one two and one one)
  • Decimal number 4 is binary 100 (one four, no twos and no ones)
  • Decimal number 5 is binary 101 (one four, no twos and one one)

Using lasers to send binary

Say we wanted to send decimal number 5 which is 101 in binary. We take each digit one at a time: start with the laser on for ‘1’, turn it off for ‘0’ and back on again for the last ‘1’.

We convert each number to binary, send it down the optic fibre with a laser, then convert it back. Computers can switch a laser beam on and off very fast, so we can send lots and lots of numbers at an incredible speed.

by Dave Budden