B CUSP 110C – Digital Thinking Exercise 4: Binary Encoding

In this exercise we will practice with interpreting binary numbers as information:

·         Examine how images may be encoded on a CD ROM (or harddrive)

Before we begin, here is some useful information for this exercise:

·         I have a 5-bit computing system (what is the largest number I can represent?)

·         I represent alphabets using the BCUSPEncodingScheme:

 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28

·         Images are represented as:

o   File name + Extension: has 7 characters

§  The name itself is four characters long

§  The extension is three characters long

§  E.g., AWEDWXY: has name “AWED” and extension “WXY”, so the file name is: AWED.WXY

o   Image resolution: has two numbers: M and N

§  M is the width of the image

§  N is the height of the image

§  E.g., 18  28: says my image is 18 pixels by 28 pixels

o   Each color: is represented by three numbers: R G B

Decoding the CD ROM: You started reading the bits (binary digits) from a given CD ROM and you see:

 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 0 1 0 …

And then you remember the 5-bit computing system, so you start to convert what you read into numbers and you see:

 Num1 Num2 Num3 21 16 17 16 23 15 31 0 0 31 31 31 0 31 0 …

Question 1: Num1, Num2, and Num3 are the converted results from the above given bits, what are Num1, Num2, and Num3?

Question 2:  You are told there is an image, as explained, the first 7 numbers forms the file name. What is the name of the file?

Question 3:  What is the resolution of the image?

Question 4:  What are the first three colors of this image? Describe these colors in English (e.g., red, pink, blue, etc.)

Question 5:  Now, an evil person has come along and decided the change the storage format on us. You are told that everything remind the same, except instead of the 4+3 (Name.EXT) file name, new format says file names are defined to be 5 characters + 3 character extensions. Please answer questions 1 to 4 again based on this new format.

## Wrap Up

In this exercise you have practiced:

·         Understanding information are represented by a fixed format

·         All information are stored as numbers on medium (CD ROM, or Harddrive, they are all numbers)

·         The interpretation (decoding) of the numbers depends entirely on the specified format