Digital Information

Reading Data As Information

Computers let us store and manipulate real-world data via encoded bits of electrons. This unit will explore how 0's and 1's (or cards or lights or anything) can be used to convey complex information like the words on the screen right now!

Binary

Combos

An ice cream shop has 4 flavors of ice cream, 3 sauces, and 5 different toppings. If you can make a dessert with one choice from each category, how many different ice cream scoops could you order? It’s important to acknowledge the slow way of addressing this before using any shortcuts. Let’s say the first flavor is vanilla. Then we could put chocolate sauce, strawberry sauce, or caramel on that which leads to 3 different sauced scoops. Then each of those sauced scoops can have the 5 different toppings for 15 different versions of the vanilla base. Three more base flavors leads to 60 different combos which does indeed equal 4 x 3 x 5, but the mechanics matter!

The most common version of this situation is when you have a reusable set of shapes that can occupy a number of spots, like having a pattern of circles, squares, and triangles in different amounts. For example if there are 5 spots for shapes, you could do 5 circles, or 4 circles and a square, or 3 circles, a square, then a final circle, and so on and so on. Or, using the abstraction, 3 x 3 x 3 x 3 x 3, or 3 to the 5th power.

You have actually been doing that work since early elementary school! This is the same logic behind number systems, or how the shapes 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 can be used in different places to represent different values.

Binary is Better

Let’s use the simplest possible number system: 2 shapes, 0 and 1. This system is called binary, in contrast to the base-10 system, decimal. We can still use binary to represent any value we want from decimal, albeit you would use up more spots to write it all out. But this cost comes with enormous benefits! You can use anything that has two distinct states to represent binary values, like true/false, 1/0, On/Off, or even physical setups like flipped cards or coins. You probably use a binary frequently with your thumbs up and down!

Binary also helps establish certainty and confidence. How are you doing today? A well-meaning question, but it can be too ambiguous to be helpful. Are you hungry? Do you need a break? Are you having trouble focusing? These yes-or-no, binary questions allow us to better communicate information to each other without having any of the guesswork of someone having an “okay I guess” kind of day.

Bits of Information

Nothing says that binary, or any numbers, have to strictly represent values. For example, you might go and order the #4 special combo at a restaurant or Zeke might be student #35 in the class, for the sake of alphabetizing work quickly. What’s truly special about this is that your brain is what made this transformation happen. 101 can be one hundred and one or five or a classroom or a menu item, but it is up to you to use context to know what those digits represent. This highlights the difference between data and information. Data is that which is given; raw symbols that require context to have meaning. That meaning, once it has been processed, is information and is what is useful to us as humans.

As Scientists we love to quantify things, so we will measure information via bits, which is just the words “binary digits” squished together. A single bit represents a single 1/0 (or true/flase or On/Off or…) and can contain two possible states. Then 2 bits can have 4, 3 bits 8, and so on and so on. Now we can quantify exactly how much memory it can take to store information, like how it would take 5 bits to store the 26 letters of the alphabet or 4 bits for a 10 item menu.

Even though we would rarely program things down to the specific bits, it is essential to know what happens if not enough memory is allocated to store different values. The most common error is an overflow, when not enough bits were allocated for the values a program actually has to use. If an 8 bit system tries to account for 257 things, it will encounter an overflow. Similarly, if the bits were used to represent decimal values, a measurement might end up too precise for the amount of memory provided, which will lead to a round-off error. These errors will lead to different problems in different environments, some less disruptive than others, but they are errors nonetheless.

Encoding

Communication Magic

Computers are fantastic tools to transfer data from one place to another, but that isn’t useful unless that data is transformed into information. We sandwich the data transmission with context to parse what is being transmitted. First all parties involved go through a setup phase where any prerequisite details are covered. For something like an in-person conversation this would be the where, when, and even details like what language would be used. Computers need to establish things like what represents a 1 and a 0 in terms of voltage or what frequency to read the signals being set.

Once the data is sent the receiver will need to process it into information through an outcome phase. You are doing that right now at different levels! Your device is taking the electrical signals and calculating what colors to turn the lights on the screen to. Your brain is taking those lights as letters and symbols and then processing it yet another time to turn that into knowledge! This also highlights why abstraction is an essential process in Computer Science - if we had to mention this full transformation of digital signals into information when covering all digital communication, it would take an unreasonable amount of time.

Numbers to Letters (or Anything)

One of the easiest encoding systems to understand is text. Abstracting away the signal processing aspect, computers will use a key that gives each symbol its own unique set of binary values. For example, in ASCII the capital A is represented using 0100 0001 (or just 65 in decimal). For other symbols or languages, other keys like Unicode might be necessary, but the mechanics are always the same: a set length of binary is translated using a dictionary into the proper symbol.

This same process works for other mediums as well. A simple black and white image could use the 1s and 0s to represent black and white or a video game could use a dictionary like ASCII that instead represents different locations on a map. For a system that only needs values, the binary could just be directly converted into decimal or hexadecimal.

Sampling

Very few things can be perfectly replicated with discrete binary. Sight and sound, for example, are composed of continuous waveforms that can never be perfectly sliced into clean bits. When we need to turn this continuous analog data into something on a computer, we use a technique called sampling to turn it into digital chunks. For example, a picture is a set of pixels made from a continuous, real-life sight. A continuous sound wave can be discretized by taking the frequency of the note playing at regular intervals so it can be stored as numbers.

Sampling can never be a perfect representation of the original analog data. You can’t zoom infinitely into a digital image and the sound being captured might lose details in the timbre or peak frequencies if they don’t align with the sample rate. But with modern technology, that might not matter! There is a limit to our human perception so sometimes the data lost via sampling won’t actually be noticeable to the observer.

Metadata

A computer file will need to carry a lot of context with it for it to be properly opened and understood. For example an image file needs to communicate the dimensions of the image and how the bits get turned into color. In addition, categorical information like the date a file was made or the author of a text need to travel as part of the total package of data. This additional information is called metadata, it is data about the data.

Compression

Acceptable Imperfections

We can only send so many bits at a time. Data travels as a part of infrastructure like water and electricity and is subject to the physical constraints that dictate decision making in those processes. It is imperative that we use each bit efficiently to transmit the most information possible under those limits. The main tool to do this is compression, when the data is rewritten using fewer 1s and 0s. This could be done by looking for patterns in the data that can be communicated more efficiently or by removing details that are not relevant to the end user.

Compression strategies fall under the general strategy of using heuristics. A heuristic is a way to approach a problem when an exact solution isn’t possible, perhaps due to time or other constraints. Instead, a heuristic is good enough, and hopefully better than nothing. This is essential in compression since needing compression at all already implies that there will be some sort of limitations on the process. In addition, since every digital file is different, it would be inefficient to create unique compression algorithms for each one.

Lossy and Lossless

The most effective compression strategies (in terms of reducing bits) are typically lossy. The term means exactly what it says - files that undergo lossy compression are shrunken down but can never be perfectly brought back to their original state. Something is lost. For example, if a high definition movie is saved at a lower resolution to work on a phone or upload quicker online, that new file will not have the same resolution and can’t be perfectly upscaled back to how it started. Similar to encoding, this can be done where a human might not notice the difference. The lost pixels of frequencies might be imperceivable or they might be worth the loss for the sake of saving memory on a space-limited device. However, this process can be devastating for archival or research purposes. Since the original bits are irretrievable, the original data might not be accurately understood.

In contrast, there are compression strategies that are lossless, though they are typically not as effective as lossy in saving bits. But there are some circumstances where absolutely no loss is acceptable, like text files. You would not want an email you send to have random typos appear due to how it was compressed, so text will always be compressed losslessly, especially since text is fairly low memory compared to media like video.

Bits, Bytes, and File Types

WYSINWYG

If you understand encoding, you understand how with digital information what you see is not what you get. The most unfortunate common example of misunderstanding encoding has to do with redacted legal text, those ominous black bars used to hide private information in published legal documents. If the lawyer preparing those documents doesn’t understand how computers process data, they would not know that their word processing software is saving the text as part of the file. This means that the information in that document isn’t truly private and could be easily accessed by anyone willing to give it a check.

Even a simple image file on a computer has tons of bits of metadata that provide more information than just a picture. By default, most devices are saving information like the time the image was made and can even have details on what camera and software was used to make the picture. This can be helpful for things like organizing and finding files, for example searching for photos taken at a specific location if GPS metadata is attached. But none of that metadata is useful unless the end user knows it is there and what to do with it.

Computer Files

This metadata also explains why even simple word documents can take up thousands of bits of data just for a few letters. Even the smallest modern files are probably on the scale of kilobytes. A byte is a shorthand for 8 bits, so a kilobyte would account for about 8,000 bits of data. Lots of memory is now measured in gigabytes (a thousand, thousand kilobytes) and terabytes (a thousand gigabytes) as programs become increasingly detailed and data hungry.

Intellectual Property

Copyright

You deserve ownership of your creative works and that is what copyright exists to protect. Specifically, you should be able to profit off of your own creations through monetary compensation or improved reputation and regard. When you create something, you now hold the copyright to it making you the exclusive contact to do things like remix or edit your work, as long as it is in some fixed medium. But the complexity of modern technology and innovation obscures these well-intentioned baseline principles, and the laws and legal system have yet to adapt.

For example, let’s say you paint a delightful little cartoon otter. Under the fundamentals of copyright, you could sell prints of your design and anyone who wants to replicate your character would need your permission to do so. But what if you made that painting with supplies at your school during a class? Or what if it was digital art where anyone could copy and save the image file off of the platform they view it on? What if you got permission from another artist to include some of their characters in a poster but it turns out they didn’t actually own the rights to it and their employer did? These questions used to have an easy answer: lawyers and legal teams would sit down and sort things out. Having any individual capable of creating widespread creative work is a new phenomena but it is still expected that copyright disputes are settled in fairly old-fashioned ways.

There have been some modern attempts to address digital copyright issues with mixed success. The most well-known is the Digital Millenium Copyright Act, the DMCA, which helps balance the responsibilities of platforms that host user-uploaded content. As long as platforms like YouTube have systems in place to monitor for copyright violations, they are following the letter of the law. These systems are usually algorithmic filters that check new uploads for protected content which has had some mixed results. Generative AI programs trained on protected work add a new layer of complexity to this problem since their outputs can reflect their ingested data.

Fair Use

Copyright restrictions taken literally would be too restrictive and stifle the innovation they are designed to serve. For example, how could a dancer perform if all other aspects of their show like music and costuming must be cleared for each number, especially as they are starting their career? This is where fair use comes into play. Copyrighted work can be adapted and used under circumstances where its purpose, nature, amount, and effect are transformative enough where they would not harm the original work’s creator. For example, if you wanted to review a new movie and have significant critiques on how different scenes are framed, it is reasonable for you to use screenshots that show the setup you are commenting on. There are some messy areas like cover songs and parody, but fair use at least gives you a starting point when thinking about the legality (and ethics) of adopting other works.

There are other ways to get access to work created by others, including the public domain. Some creators and institutions automatically release their product into their public domain to encourage its proliferation, especially with educational and advocacy materials. Works also automatically enter the public domain after a set amount of time has passed. Though there are some messy areas due to estates and company-owned works, lots of old texts and art are fully available in the public domain to work with!

Creative Commons

As a creator, you are also allowed to simply release your rights to your work. But that is rarely a sustainable path forward and instead you will want to strike a balance between letting others help share your work without outright stealing your potential profit from it. This is where a system like Creative Commons can come in handy! CC has designed flexible licensing options you can attach to your work when you publish it, clearly outlining how others can use it. For example you could let others remix and adapt a character you designed as long as they do not profit off of it and they credit you somewhere in their work. Or maybe they can adapt your work as long as they too release it with that same Creative Commons license!

Other Resources

TBD