It All Comes Down To 1’s and 0’s In The End

I remember seeing a talk from a leading technical person from GCHQ, and his viewpoint was that we seem to be creating a future workforce…

Photo by Markus Spiske on Unsplash

It All Comes Down To 1’s and 0’s In The End

I remember seeing a talk from a leading technical person from GCHQ, and his viewpoint was that we seem to be creating a future workforce of “tech users” rather an “tech experts”. For me, we should be teaching every child to “properly” program from the earliest age, and allowing them to see the beauty of what happens “under the hood”.

As a child, I was forever taking the back of electrical things, and trying to understand how they worked. Now, we fire up an App, and everything works like magic. But we need to be teaching our kids how the magic works, otherwise they will have little understanding about how this amazing machine — The Internet — has been created, and thus to take full advantage of it.

Fixing Errors

One of the areas that I find amazing is that we just need one single bit to be in error, and it might result in a program crashing or for the message to be delivered incorrectly. Well, there’s some magic behind the scenes called error correction and error detection that handles all of this, and makes sure that we don’t get any errors in our digital systems.

In the simplest form, we have a basic check bit — called a parity bit. And this makes the data transmitted either odd parity — where there is an odd number of 1’s — or even parity — with an even number of 1’s. If one of the bits is in error, it will make the parity wrong, and we can discard the data. This is called error detection, and we can’t recover the data, as we don’t know which bit (or bits) is in error. Normally we would then ask for a retransmission in this case. But if there was no opporuntity of a retransmission — such as with a CD-ROM — we must build in error correction, and which will fix as many bits as possible. Here is an outline:

And some practical Python code [here]:

Conclusions

Go do Python, and learn about the beauty of the most amazing engine ever created … the Internet.