Unit 1: Digital Information

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What are the similarities and differences between the binary and decimal systems?

Both binary and decimal systems increase by the same exponents, but they are different in that the binary system has a base of 2, and the decimal system has a base of 10. So both can be raised to the power of 3 but binary would equal 8 and decimal would equal 1000.

Lossless and lossy compression are present in many different file formats (image, music, video, etc.). Which of the following statements below is NOT true?

Lossy formats are excellent to use when a file must be compressed and rebuilt to its exact pre-compressed specifications.

Using 9 bits per pixel, give the values for two pixels that are different shades of blue. Label which one is the darker shade.

Light Blue: 000 000 111 Dark Blue: 000 000 001

A computer program uses 3 bits to represent integers. When the program adds the decimal (base 10) numbers 5 and 3, the result is 0. What is the best explanation for the result?

An overflow error occurred.

An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When they attach the file to their email, it shows as 750 bytes. The author gets very upset because they are concerned that part of their book has been deleted by the email provider. If you could talk to this author, how would you explain what is happening to their book?

The file for your book has been compressed using lossless compression. This means that the file has been made smaller so that it can be sent faster. With lossless compression, none of the quality or words have been deleted through compression and will return when the file has been decompressed.

Consider the following: 0110 1011 0010 1011 This sequence represents...

something that depends on the context in which it is used.

A computer program uses 4 bits to represent nonnegative integers. Which of the following statements describe a possible result when the program uses this number representation? The operation 4 + 8 will result in an overflow error. The operation 7 + 10 will result in an overflow error. The operation 12 + 4 will result in an overflow error.

2 & 3

An online store uses 6-bit binary sequences to identify each unique item for sale. The store plans to increase the number of items it sells and is considering using 7-bit binary sequences. Which of the following best describes the result of using 7-bit sequences instead of 6-bit sequences?

2 times as many items can be uniquely identified.

The measurement of the length of an object needs to be stored digitally. Assume that 8-bit ASCII encoding is being used. What is the minimum number of bits necessary to represent both the length (an integer number from 0-20) and its unit of measure (represented by two ASCII characters such as "FT" or "IN")?

21

A video-streaming Web site uses 32-bit integers to count the number of times each video has been played. In anticipation of some videos being played more times than can be represented with 32 bits, the Web site is planning to change to 64-bit integers for the counter. Which of the following best describes the result of using 64-bit integers instead of 32-bit integers?

232 times as many values can be represented.

What is the largest number that can be stored using 8 bits of memory?

255

Convert the following hexadecimal to binary: 2BF

001010111111

Convert the following decimal number to binary: 122

01111010

An artist makes an image in which each pixel color is encoded with 12 bits (4 bits for each color). Which of the following correctly shows the hexadecimal value for green as a 12-bit representation?

0F0

Warehouse XYZ currently uses 4-bit binary sequences to identify 15 different inventory items it stores. The warehouse is planning to expand by purchasing a local warehouse which will enable them to store an additional 17 inventory items. What's the minimum additional bits the binary sequence will need to uniquely identify each item stored in both warehouses after the expansion?

1 additional bit

Assume your friend just sent you 32 bits of pixel data (just the 0s and 1s for black and white pixels) that were encoded after sampling an image. What is true?

1. The correct width and height must be input into the pixelation widget to produce the image. 2. The fact that only 32 bits were used to represent the image indicates relatively large sample squares were used. The digital image may vary from the analog image significantly.

Consider the following numbers given in Binary (BIN), Decimal (DEC), and Hexadecimal (HEX): BIN: 1011 BIN: 1101 DEC: 10 HEX: C Which of the following lists the numbers in order from least to greatest?

10, 1011, C, 1101

Each student that enrolls at a school is assigned a unique ID number, which is stored as a binary number. The ID numbers increase sequentially by 1 with each newly enrolled student. If the ID number assigned to the last student who enrolled was the binary number 1001 0011, what binary number will be assigned to the next student who enrolls?

1001 0100

What is the largest number than can be represented with 10 bits?

1023 (values 0-1023)

Add the following two binary numbers: 1101 + 1011 = ?

11000

Convert the following binary number to decimal: 10110101

181

A programmer is creating an app that will convert a binary number to its decimal equivalent. The app will prompt the user to input a binary value, click the convert button, and then display the decimal equivalent. The programmer is testing the app to ensure it is converting correctly. If the user inputs 10011, what is the correct output in decimal format?

19

A student needs to represent 26 different letters using binary. What is the minimum number of binary digits she will need to represent this many letters?

5

Convert the following decimal number to hexadecimal: 1500

5DC

A computer can use 6 bits to store a non-negative number. Which of the following is the largest number that will NOT give an overflow error?

63

If you have 4 shapes, how many 3-place patterns could you make?

64 (4^3=64) (values 0-63)

How many bits would you need to represent 65 different patterns?

7 bits (2^7=128) (values 0-127)

Which of the following is an advantage of a lossless compression algorithm over a lossy compression algorithm?

A lossless compression algorithm can guarantee reconstruction of original data, while a lossy compression algorithm cannot.

What can be represented by exactly two binary digits? Select TWO answers.

Compass directions (North, South, East, West) Classifying a student by pass or fail and whether or not they have perfect attendance.

A color is often represented by a 6-digit hexadecimal number that describes how the colors red, green, and blue are mixed to create the desired color. From left to right, the first two digits represent the amount of red, the second two digits represent the amount of green, and the last two digits represent the amount of blue. Which of the following hexadecimal numbers represents the color with the greatest amount of blue in it?

A100B0

How many bits would be needed to count all of the students in class today?

Assuming that there were 16 students in class today (each of the four tables being full), you would need 4 bits. You need 4 because 2^4=16 values are represented. This means you can count from 0-15, allowing you to assign each student a number from 0-15.

Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string more than once and replaces each instance of that pair with a corresponding character that does not appear in the string. The algorithm saves a list containing the mapping of character pairs to their corresponding replacement characters. For example, the string "THIS_IS_THE_BEST_WISH" can be encoded as "%#_#_%E_BEST_W#H" by replacing all instances of "TH" with "%" and replacing all instances of "IS" with "#". Which of the following statements about byte pair encoding is true?

Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.

What would result in a better digital approximation of an analog black and white image?

Decreasing the size of each sample square, thus increasing the number of samples taken.

A video game character can face toward one of four directions: north, south, east, and west. Each direction is stored in memory as a sequence of four bits. A new version of the game is created in which the character can face toward one of eight directions, adding northwest, northeast, southwest, and southeast to the original four possibilities. Which of the following statements is true about how the eight directions must be stored in memory?

Four bits are enough to store the eight directions.

An author is considering publishing an e-book using a Creative Commons license. In which of the following situations would it be better for the author to use a Creative Commons license instead of a traditional copyright? The author wants to make the e-book available as a free download. The author wants to prevent people from sharing copies of the e-book on peer-to-peer networks. The author wants to allow people permission to use and modify the e-book.

I and III

Your computer science teacher asks you to sample a black and white image that is 4" x 6". How would you sample the image to provide a good digital approximation using the pixelation widget? What sample size would you use? How would your decision affect the digital representation?

I would first place a grid on top of it to understand where the black values are most concentrated. I then might use a 4x6-pixel sample size, with each pixel being 1x1in. This would not be the most accurate representation because the sample size is too large, therefore I have fewer pixels to work with. For a better image, I would decrease the sample size, increasing the number of pixels I would have to represent the information.

Which of the following can be represented by a sequence of bits? An integer An ASCII character An image

I, II, and III

You've been given a new cell phone with a 2 gigabyte data plan. You plan to use your phone for text messages, images, video, and music. Which of these categories are best compressed using lossless compression? Which of these categories are best compressed using lossy compression? Why?

Images and video would be best with lossless compression because they will lose visibility and image quality fast with lossy compression. However, text messages and music are expected to happen simultaneously, so it would be better to use lossy compression. Personally, I would prefer to wait a while longer for the video and images to load due to their lossless compression to have clear, high-quality content. However, when I want to listen to music and send text messages, the wait time required by lossless compression would be unnecessary and annoying, making me prefer lossy compression.

As a reminder, in the warm-up we saw this scenario: Imagine you were using some of our pixelation tools to create an image and you posted it online for your friends to see - but, a week later you find out someone took that image and put it on a T-shirt that they're selling for $10 each. Now that we understand Copyright, what would need to change in order for the scenario from the warm-up to be okay?

In order for someone to make a T-shirt using my work and for it to be okay, I must put my graphic in Creative Commons. If I had done so, then the person making the T-shirts would not be violating my intellectual property. It would also be okay if they asked me permission and/or paid me to use my work. Finally, if they changed the design slightly, while that is ethically dubious, it is technically ok.

The author of an e-book publishes the e-book using a no-rights-reserved Creative Commons license. Which of the following best explains the consequences of publishing the book with this type of license?

Individuals can freely distribute or use the contents of the e-book without needing to obtain additional permissions from the author.

How is a Creative Commons license different from a regular copyright?

It allows your work to be shared, reused, and remixed to help spark more creativity.

"The binary pattern 01000001 represents the number 65." Write a brief response explaining whether you believe this statement is always true. Explain your reasoning.

No, I do not believe the binary pattern 01000001 always represents the number 65, although this binary pattern does translate to the decimal number 65. I believe this pattern does not always represent the number 65 because it can correspond to anything according to its context. In a computer game, this binary pattern could correspond to a key on the keyboard that gives the playable character the command to move left. In a writing software, it could correspond to the letter A appearing on the screen. This binary pattern could represent a variety of commands depending on the situation.

When using bits to represent fractions of a number, can you create all possible fractions? Why or why not?

No, you cannot represent all possible fractions because, at some point, the fraction will become extremely precise, and there will be a round-off error. This happens because there is not enough bits to represent the number accurately, so it rounds.

Describe how place value is used in the binary number system. How is it similar or different from the way place value is used in the decimal and hexadecimal system? Be specific.

Place values in the number system is what makes the symols/shapes have different values. For example, in the binary system, there are only two shapes (0,1) but with place values, those shapes can represent a wide variety of values. 1000 has a higher value than 0001 because the one is in a different place value. All number systems make use of place values but they are each unique due to the number of shapes that are used in the system, called their base. In the decimal system, there is a base 10 system, with 10 shapes (0-9). In the hexadecimal system, there is a base 16 system, with 16 shapes (0-9, A-F). Because decimal and hexadecimal have different bases than each other, the same symbol put in the same place value would have a different value. For example the number 10 in the decimal system is equal to A in the hexadecimal system. To represent the same number, the decimal system needed two place values because of its smaller base number (10) while the hexadecimal system needed only one place value because of its larger base number (16).

Describe the process of sampling an analog image to make a digital representation of the image. In other words, how would you sample Vincent van Gogh's The Starry Night measured at about 36" wide and 29" high to make a good digital approximation? What sample size would you use and how would your decision affect the digital representation? Be specific.

Sampling a color image requires the use of pixels, which are equal sized squares that are encoded using RGB data consisting of red, green, and blue light. Each pixel has a certain number of bits used to store the information. If we use 12 bits per pixel, there would be 4 bits per color to store the amount of red, green, and blue light. Those bits are what the computer uses to display the colors on the screen. If I choose to sample a 36" x 29" image by using 36 by 29 pixels, then I will have a relatively large sample size with only 1044 pixels. This would not be a good representation of the analog image. If I choose to decrease the sample size by using 360 by 290 pixels, this will increase the number of pixels to 104,400 which would allow for a much better representation of the image. The smaller each sample square, the better the approximation of the analog image.

What is true about analog and digital images?

Sampling an analog image more frequently produces a digital image with a better representation.

Two schools are merging and to adapt to the increased size of the student body, the school is changing its system for keeping track of all student IDs from a system that uses 4-bit binary numbers to one that uses 8-bit binary numbers (AKA 1 byte). Which of the following best describes what effect this change will have?

The 8-bit system will be able to represent sixteen times as many values as the 4-bit system.

A program developed for a Web store represents customer account balances using a format that approximates real numbers. While testing the program, a software developer discovers that some values appear to be mathematically imprecise. Which of the following is the most likely cause of the imprecision?

The account balances are represented using a fixed number of bits, resulting in round-off errors.

Each time we add another bit, what happens to the amount of numbers we can make?

The amount of numbers we can make increases double. An example would be 2^3=8 and 2^4=16; 8x2=16.

What is the most important quality of lossless compression?

The data is transformed to usually make it smaller. It can always be re-constructed back to the original.

Encoding protocols determine what type of data can be represented by these values. What could this byte represent: 0101 1001?

The decimal number 89. A capital letter from the ASCII character set.

What error will occur when trying to store the number 176 using 1 byte of memory?

The number 176 can be stored using 1 byte without error.

The position of a runner in a race is a type of analog data. The runner's position is tracked using sensors. Which of the following best describes how the position of the runner is represented digitally?

The position of the runner is sampled at regular intervals to approximate the real-word position, and a sequence of bits is used to represent each sample.

Modern car odometers can record up to a million miles driven. What happens to the odometer reading when a car drives beyond its maximum reading?

There is an overflow error, so it will revert back to the beginning, counting off from 0 again. This only happens when the numbers/space runs out, so the computer no longer knows how to account for the greater value, so it starts from the beginning 0.

Describe how the process of sampling, RGB pixels, and binary sequences work together to display a digital color image.

You sample an analog image in order to convert it to a digital image made up of pixels. RGB pixels create the image through each pixel representing one color. Together, the pixels combine to make a digital image with various colors and values. However, each pixel is only assigned a specific color through binary code; binary is what gives the command for the pixel to be a specific color in a particular position in an image after you put in the 24 bits of metadata that determine the sample size and the number of bits per pixel. The more bits per pixel, the more hues and shades of color you can represent.


Ensembles d'études connexes

Ch 3 Science and the Sociology of Race

View Set

LECTURE 28: basics of metabolism

View Set

Nutrition Test 4 Rebecca Bibby Fall 2021

View Set