Much of what we experience in the physical world is not binary. For example, throughout the day the intensity of light changes in very small amounts over a continuous range of values. That is another way of saying that we can see the difference between noon and midnight very clearly, but the difference between noon and one minute past noon is almost impossible to see. But what does that mean when we talk about the digital world, or the world of computing?
Think of an old thermometer, the kind that has a column of mercury inside a glass tube. It uses a scale of degrees (or tenths of degrees or hundredths) to measure differences in temperature. Imagine you are interested in the temperature outside your house. It may be that plus or minus five degrees is a good scale - you would go out of the house in shorts if it was 75¨H, plus or minus five degrees. But you might want more precision, such as when you need to make ice cubes. Since ice freezes at 32¨H, five degrees colder might be fine, but five degrees warmer would not. To get better precision, we can divide up the temperature scale, or the marks on the column of mercury, into smaller and smaller pieces to represent smaller and smaller differences. Those differences are represented by discrete units, or digits. We can now see the difference between a temperature of 98.6¨H and 98.7¨H, even if we can't feel any difference.
This dividing up into very small pieces to more closely represent the change in something is the same technique used to represent audio and video digitally. The event of sound or sound and visual is happening continuously, and to accurately represent changes, we need to take very small samples and represent them with collections of the binary digits (or bits) that computers can operate on. These presences and absences, or ones and zeros, are the building blocks of our digital world.
In this seventh lab, we'll look at different levels and types of encoding, as well as tools to help us convert analog representations to digital ones. As you explore, review your answers from the To consider: section above. Have you changed your mind about any of them?
As you can imagine, there are plenty of examples of digital encoding all around us. Some are an attempt to replicate the physical world as closely as possible, while others take a less serious approach.
The image also links back to Sau Fan Lee's project page, where you can see the original image that has been re-encoded into ASCII. Why do you think he took the time to write this program?
Andreas Friese, an ASCII artist also known as a:f, has a gallery of his art that is not recreating images at all, but creating them. Why do you think someone like Andreas would spend so much time using his text editor to create these images, instead of using some other art medium? Give ASCII art a try by using the online ASCII art and ASCII text generators at mastervb.net, or take a look at Joan G. Stark's old school site. Did you take a look at that page's source code? What did you find?
You can also encode messages for secure transmission. Cryptographic techniques like PGP encryption and steganography go beyond simple encoding to protective measures that obscure the transmitted message. When is cryptographic encoding useful? Could it be misused?
Try IT: Looking at encoding tools
There are plenty of sites that can help you with what can sometimes be the
tedious chore of encoding. Need to convert a number from hex to binary? Want
to get the correct hex value for a color you are using on your website? These tools
can help.
There are so many types of encodings out there, digital and otherwise. Some were made to help transmit information, and some to help hide it.
Much of our digital world is basedon the idea of representing continuous change with
discrete samples. Want to know more about the origin of that idea?
Take a look at Wikipedia's Calculus page, especially the work
of
Bonaventura Cavalieri,
Gottfried Leibniz, and Sir Issac Newton.
If you haven't had a calculus class, you might find it a bit challenging, but it
might help to look at this image of a
Riemann sum, or integral, which illustrates the progressively smaller
samples method of approximating continuous changes (From Wikipedia user
Ksmrq):