Docsity

Code HS Questions and Solutions: Data Abstraction, Binary Numbers, and Image Manipulation, Exams of Nursing

Toggle sidebar
bg1
Code HS questions with complete
solutions
What is data abstraction? - correct answer The process of simplifying complicated data
into manageable chunks
Which of the following are examples of encoding information? - correct answer
Representing fast food meals as numbers on the menu. For example a number 1
represents a hamburger.
Assigning a numeric value to every area of a region, for example zip codes in the United
States
Assigning a number to every character of the alphabet so we can represent sentences
as series of simple digits.
What is the number base of the binary number system? - correct answer 2
In the binary value 1002, what is the place value of the 1? - correct answer 4s place
How many possible values can be created with only 2 bits? - correct answer 4
How many bits are used to encode a character according to the ASCII encoding
scheme? - correct answer 8 bits
(ex: 0100 0001 encodes 'A')
What is a pixel? - correct answer A single tiny dot, or square, of color in a digital image.
What is the value of 9F16 in binary? - correct answer 1001 11112
What is the value of F16 in decimal? - correct answer 15(10)
What are the 3 color channels that make up a pixel according to the RGB color
scheme? - correct answer Red, Green, and Blue
What is the range of values (expressed in decimal) that each color channel can have? -
correct answer (0)10 - 255(10)
Which of the following pixels has a color value of #ff0000 (expressed in hexadecimal) -
correct answer (Red Pixel)
pf2

Partial preview of the text

Download Code HS Questions and Solutions: Data Abstraction, Binary Numbers, and Image Manipulation and more Exams Nursing in PDF only on Docsity!

Code HS questions with complete

solutions

What is data abstraction? - correct answer The process of simplifying complicated data into manageable chunks Which of the following are examples of encoding information? - correct answer Representing fast food meals as numbers on the menu. For example a number 1 represents a hamburger. Assigning a numeric value to every area of a region, for example zip codes in the United States Assigning a number to every character of the alphabet so we can represent sentences as series of simple digits. What is the number base of the binary number system? - correct answer 2 In the binary value 1002, what is the place value of the 1? - correct answer 4s place How many possible values can be created with only 2 bits? - correct answer 4 How many bits are used to encode a character according to the ASCII encoding scheme? - correct answer 8 bits (ex: 0100 0001 encodes 'A') What is a pixel? - correct answer A single tiny dot, or square, of color in a digital image. What is the value of 9F16 in binary? - correct answer 1001 11112 What is the value of F16 in decimal? - correct answer 15(10) What are the 3 color channels that make up a pixel according to the RGB color scheme? - correct answer Red, Green, and Blue What is the range of values (expressed in decimal) that each color channel can have? - correct answer (0)10 - 255(10) Which of the following pixels has a color value of #ff0000 (expressed in hexadecimal) - correct answer (Red 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. - correct answer R = Math.min(R + 50, 255); G = Math.min(G + 50, 255); B = Math.min(B + 50, 255); Which of the following describes the instructions for a general image filter? - correct answer 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 of the following functions properly removes all green and blue from a pixel and returns the modified pixel? - correct answer var RED = 0; var GREEN = 1; var BLUE = 2; function removeGreenAndBlue(pixel) { pixel[GREEN] = 0; pixel[BLUE] = 0; return pixel; }