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
Compression
Bits, Bytes, and File Types
Intellectual Property
Other Resources
TBD