codehs unit 5
Suppose the ESPN website uses 8-bit unsigned integers to store how many points a team has scored in an NBA game. For example: 0000 0010 represents 2 points 0000 1000 represents 8 points What is the highest possible score the ESPN website could display?
255 to the 10
What is the range of values (expressed in decimal) that each color channel can have?
01 to the 0 - 255 to the 10
What is the value of 9F16 in binary?
1001 1111 to the 2 (look at chart)
Consider the following numbers: The decimal value 1010 The binary value 10012 Hexadecimal value C16 Which of the following lists the numbers in order from least to greatest?
10012, 1010, C16
What is the value of 1310 in binary?
1101 to the 2
What is the value of C16 in decimal?
12 to the 10
What is the decimal value of 1101 to the 2?
13 to the 10
How many different digits are used in the Hexadecimal number system?
16
How many different values can be represented using 4 bits?
16 different values
What is the number base of the binary number system?
2
An online store uses 8-bit binary values to identify each unique item for sale. The store plans to increase number of items it sells and is considering changing to 9-bit binary values. Which of the following best describes the result of using 9-bit values instead of 8-bit values?
2 times as many items can be uniquely identified
A news website uses 32-bit integers to count the number of times an article has been viewed. The website is becoming more popular, and expects some of the articles to exceed the number of views that can be represented with 32 bits. In anticipation of this, the website is planning to change to 64-bit integers for the view counter. Which of the following best describes the result of using 64-bit integers instead of 32-bit integers?
2^32 times as many values can be represented
How many possible values can be created with only 2 bits?
4
In the binary value 100 to the 2, what is the place value of the 1?
4s place
How many bits are used to encode a character according to the ASCII encoding scheme?
8 bits(ex: 0100 0001 encodes 'A')
What is a pixel?
A single tiny dot, or square, of color in a digital image.
Which of the following are examples of encoding information?
All of the above
A computer program uses 3 bits to represent integers. When the program adds the decimal (base 10) numbers 6 and 2, the result is 0. Which of the following is the best explanation for this result?
An overflow error occurred.
Which of the following describes the instructions for a general image filter?
Given an image: for every (x, y) coordinate in the image Get the current pixel at (x, y) Modify the pixel according to a function Update image at (x, y) with this modified pixel
Which ASCII character is represented by the decimal (base 10) number 72?
H
We want to write a brightness filter that brightens a given pixel. Which of the following instructions would brighten a pixel? Assume R is the red value of the pixel, G is the green value, and B is the blue value.
R = Math.min(R + 50, 255); G = Math.min(G + 50, 255); B = Math.min(B + 50, 255);
What are the 3 color channels that make up a pixel according to the RGB color scheme?
Red, Green, and Blue
What is data abstraction?
The process of simplifying complicated data into manageable chunks
A student is transferring photos from her camera to her computer. The student notices that the saved photos on her computer are lower quality than the original raw photo on her camera. Which of the following could be a possible explanation for the difference in image quality?
The saved image files were compressed with a lossy compression technique.
Which of the following is a true statement about data compression?
There are trade-offs involved in choosing a compression technique for storing and transmitting data.
The RGB encoding scheme encodes a color using 24 bit sequences. The first 8 bits encode the amount of red in the color, the next 8 bits encode the amount of green in the color, and the last 8 bits encode the amount of blue in the color. Which of the following is a true statement about the color encoded by this binary sequence: 1110 1001 0111 1100 0000 1111
This color is mostly red.
ASCII characters can also be represented by hexadecimal (base 16) numbers. According to the ASCII character encoding, which of the following characters is represented by the hexadecimal (base 16) number 6E16
n
Which of the following pixels has a color value of #ff0000 (expressed in hexadecimal)
red
Which of the following functions properly removes all green and blue from a pixel and returns the modified pixel?
var RED = 0; var GREEN = 1; var BLUE = 2; function removeGreenAndBlue(pixel) { pixel[GREEN] = 0; pixel[BLUE] = 0; return pixel; }