All the important bits

Transport yourself to the days of yore, meaning before Whatsapp. OK, long before Whatsapp. You're on a hilltop and I'm on another. We can see each other, but we're too far apart to hear each other.

One balmy evening, you want to send me a message. All we have is a torch each that we can shine at each other. Any communication, we've agreed beforehand, will be based on turning the flashlight on, meaning "1", and off, for "0". We've also agreed beforehand on a code we'll use, meaning each letter of the alphabet is represented by a specific sequence of five 1s and 0s. Call them five bits.

So yes, you want to send me a message. You start it off, with your torch. But it's also started raining. I'm squinting hard, but I'm not always fully sure I can see the light. I decode and write down as you transmit, but sure enough, at the end, what I have has plenty of obvious mistakes: "SQND FOODH NERY HANGRY!"

The next day, we meet to discuss the fiasco, and somehow you're both hungry and angry. Is there some way, I ask, that you can transmit your message so that I can at least detect an error right away? You say "Aha! Yes indeed!" After every letter, meaning after every five bits, you'll transmit a sixth bit before moving on to the next letter. That sixth bit will help me detect an error in the previous five. If I find one, I'll use a signal we've also agreed on beforehand, to tell you to re-transmit.

How does this work? You count the number of 1s in each set of five bits, or each letter. If that number is even (0, 2 or 4), the sixth bit is 0. If odd (1, 3 or 5), it is 1. What this means, if you give it a moment of thought, is that every six bits you transmit will have an even number of 1s.

See it now? In each six bits I receive, I simply count the 1s. If they are odd, I know for sure there's an error, so I promptly flash our signal to ask you to re-transmit the same six bits. If even, there might still be errors, but at least it's likely that I received the set correctly.

Indeed, that sixth bit helps. In fact, this is a commonly-used mechanism in transmitting data. The extra bit is called a "parity bit"; the word "parity" refers to the oddness or evenness of the count of 1s, which the extra bit encodes. The method I spelled out above is "even parity", because the number of 1s in an error-free six bits is always even. Similarly, if we do the opposite with the extra bit, we have "odd parity".

But enough with the nomenclature. You will agree that this is a simple way to detect errors in the transmission of data. You may also agree that when it comes to data, every single bit matters. If your transmission is likely to be dodgy, that extra bit is vital. It's what a bit can do.

This came to mind some months ago, when I read some news about Voyager I. This is the spacecraft we launched in 1978 with the specific purpose of journeying across the solar system and beyond. Which purpose it has achieved in, well, stellar fashion. It has found a new ring around Saturn, new moons orbiting Jupiter, and has now left the solar system and is racing through interstellar space at 17km per second. Nearly a half-century after it launched, it is still sending data back to us, no doubt with extra error-detection bits incorporated into the stream. And this stream is how we learned about the moons and the ring.

"Humanity's most distant scientific outpost", Voyager I has been called. Though that label may have reached its sell-by date. That's because last November, the stream of data turned into bilge. Put it this way, we are still getting 0s and 1s from Voyager I, but there is no sensible way to interpret them.

To understand this, consider how we zap photographs to each other without a thought, via Whatsapp or email. This works because there are formats in which a photograph is encoded, or represented, as an array of 1s and 0s, and it's that array we transmit. "JPEG" is one such format. A JPEG file is actually a series of segments, each of which carries specific information about the image. I won't touch on what these segments mean or look like, except for this: each one begins with a specific identifying marker. These markers are all 16 bits (or two "bytes") long, and the first eight of those (the first byte) are all 1s. Setting up the file this way is exactly how a photograph turns into a JPEG file.

A bit at a time, eight times over, and you get a byte

And what happens when you try to "open" such a file, whether in email or elsewhere? Think of how you read a map: the first thing you do is look for the compass that tells you which way is north, then the scale that tells you how to understand distances, and on from there. That is, you search on the map for those particular markers. Analogously, the software that goes to work to open a JPEG file must locate each segment in turn, interpret the information it contains, and eventually reconstruct the whole image. To do this, it searches in the file for the markers. It searches for sequences of eight 1s.

Now imagine that somehow, en route to you, the JPEG file gets corrupted, and in this tiny way: in one of those marker bytes that should contain all 1s, one bit becomes a 0. What happens? Well, that specific segment can no longer be located in the file. Whatever information it encodes is thus no longer available. This leaves no sensible way to interpret the file. The reading software will either give up or produce something meaningless. Bilge, you might say.

To be clear, I'm certain the JPEG format itself has ways to counter such errors. There are probably parity bits, or some other error-correcting mechanisms, in the transmission. And any JPEG-reading software package will be robust enough to recognize and correct errors. But you get the point, I'm sure. A single bit, changed, can have a disastrous impact.

Something like this, NASA scientists believe, happened on Voyager I. Though there, they think a bit flipped in the software on board the spacecraft. That causes the software to produce, yes, bilge, and it probably drowns out any possible parity bits, too. Can this be fixed? Well, Voyager I is soaring through space outside the solar system, billions of km distant. So there's no way to physically flip the bit back. NASA scientists have tried sending instructions that might do the job, or bypass the flipped bit somehow. That hasn't worked. Not least, this is software that was written nearly a half-century ago. Not too many people around who can understand it and find workarounds.

The upshot? For the foreseeable future, Voyager I will keep sending us streams of meaningless 0s and 1s. In that sense, it's still in touch. But in every other respect, it's likely Voyager I is lost to us.

Which is what a bit can do.

And maybe it's what (sticking a plug for a certain college in here) BITS can do.

***

(If you enjoyed this and want more, please consider hitting that "Support" button below. Thanks!)

Write a comment ...

Dilip D'Souza: Death Ends Fun

Show your support

I'll give you good writing and journalism. Please consider paying!

Recent Supporters

Write a comment ...

Dilip D'Souza: Death Ends Fun

Pro
Independent writer, Bombay