apcsp codehs stuff

studied byStudied by 1 person
5.0(1)
get a hint
hint

What is data abstraction?

1 / 45

Tags and Description

46 Terms

1

What is data abstraction?

The process of simplifying complicated data into manageable chunks

New cards
2

Which of the following are examples of encoding information?

All of the above (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)

New cards
3

What is the number base of the binary number system?

2

New cards
4

In the binary value 1002, what is the place value of the 1?

4s place

New cards
5

What is the value of 1410 in binary?

1110

New cards
6

How many bits are used to encode a character according to the ASCII encoding scheme?

8 bits \n (ex: 0100 0001 encodes ‘A’)

New cards
7

How many possible values can be created with only 2 bits?

4

New cards
8

What is a pixel?

A single tiny dot, or square, of color in a digital image.

New cards
9

What is the value of F16 in decimal?

15

New cards
10

What is the value of 9F16 in binary?

1001 1111

New cards
11

What are the 3 color channels that make up a pixel according to the RGB color scheme?

Red, Green, and Blue

New cards
12

What is the range of values (expressed in decimal) that each color channel can have?

0 - 255

New cards
13

Which of the following pixels has a color value of #ff0000 (expressed in hexadecimal)

Red

New cards
14

We want to write a brightness filter that brightens a given pixel.

R = min(R + 50, 255) G = min(G + 50, 255) B = min(B + 50, 255)

New cards
15

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

New cards
16

Which of the following filter functions properly removes all green and blue from a pixel and returns the modified color tuple?

RED = 0 GREEN = 1 BLUE = 2 def remove_green_and_blue(pixel): new_green = 0 new_blue = 0 return (pixel[RED], new_green, new_blue)

New cards
17

Why do we compress data?

All of the above (To save memory space on devices, To speed up the time it takes to send a file over the internet, The computation it takes to decompress data is cheaper than the storage space required to store uncompressed data)

New cards
18

Which of the following is true about lossless data compression?

The compressed data can be restored back to its original state

New cards
19

We are going to compress this text using the Run Length Encoding compression algorithm:

WWWWWWHAAAAAAT??

Which of the following would be the proper compressed text?

W6H1A6T1?2

New cards
20

What types of data should be compressed with the Run Length Encoding algorithm? What types of data does the algorithm perform well with?

Text with many repeated characters

New cards
21

Which of the following is true about lossy compression?

All of the above (Lossy compression can compress data down to significantly less bits than lossless compression can, Data compressed with lossy compression cannot be restored back to its original state, Lossy compression throws away a lot of the original data, but humans can’t even tell anything is missing)

New cards
22

Which of the following are true about Public Key Encryption?

I: It requires all senders and receivers to have their own public key and their own private key \n II: A message encrypted with a person’s public key can only be decrypted with the same person’s private key \n III: A public key can be shared with anyone \n IV: Public key encryption is the most common form of encryption for internet communication

I, II, III, and IV

New cards
23

Which of the following are true about Symmetric Key Encryption?

I: The same key is used for both encryption and decryption \n II: The sender and receiver must exchange a shared key in private before using symmeric key encryption to communicate \n III: Symmetric key encryption is the most common form of encryption for internet communication

I and II only

New cards
24

Which of the following statements are true about Caesar’s Cipher?

I: Caesar’s Cipher is a form of Symmetric Encryption \n II: Caesar’s Cipher is a “hard” encryption to crack

I only

New cards
25

Which number system is used to store information digitally in a computer?

Binary (base 2)

New cards
26

How many different digits are used in the Hexadecimal number system?

16

New cards
27

What is the decimal value of 1101(2)?

13

New cards
28

How many different values can be represented using 4 bits?

16 different values

New cards
29

Suppose the ESPN website uses 8-bit unsigned integers to store how many points a team has scored in an NBA game. \n For example: \n 0000 0010 represents 2 points \n 0000 1000 represents 8 points

What is the highest possible score the ESPN website could display?

255(10)

New cards
30

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

New cards
31

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 6E(16)

n

New cards
32

Which ASCII character is represented by the decimal (base 10) number 72?

H

New cards
33

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.

New cards
34

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.

New cards
35

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?

1001(2), 10(10), C(16)

New cards
36

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

New cards
37

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.

New cards
38

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.

New cards
39

RED = 0 GREEN = 1 BLUE = 2 def filter(pixel): pixel[RED] = 255 - pixel[RED]; pixel[GREEN] = 255 - pixel[GREEN]; pixel[BLUE] = 255 - pixel[BLUE]; return (pixel[RED], pixel[GREEN], pixel[BLUE])

Which of the following best describes the result of applying this filter to every pixel in the image?

The image will be inverted, bright pixels will become dark and dark pixels will become bright.

New cards
40

What is the range of numbers for the ASCII Code Chart?

65 - 122

New cards
41

How many non letter characters are in between the upper case and lower case ASCII Code Chart characters?

6 (90 - 96)

New cards
42

Does upper case or lower case come first in the ASCII Code Chart?

Upper case

New cards
43

How do you convert from decimal to binary?

Write it out, write out the bases of 2s for the binary system up until it exceeds the amount in decimal form, subtract by each, put a 1 if it can be put a 0 if it can’t be.

New cards
44

How do you convert from binary to decimal?

Write it out, write out the bases of 2s for the binary system under it, multiply the 1s by the number under them, add them together

New cards
45

How do you convert from hexadecimal to decimal?

Write it out, write the bases of 16s for the hexadecimal system (1, 16, 256, etc.), multiply the number/letter by the number under it, add them together

New cards
46

What are the numbers in the hexadecimal system?

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

New cards

Explore top notes

note Note
studied byStudied by 17 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 45 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 133 people
Updated ... ago
5.0 Stars(9)
note Note
studied byStudied by 101297 people
Updated ... ago
4.9 Stars(511)

Explore top flashcards

flashcards Flashcard93 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard212 terms
studied byStudied by 30 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard38 terms
studied byStudied by 66 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard50 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard123 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard255 terms
studied byStudied by 240 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard90 terms
studied byStudied by 307 people
Updated ... ago
4.6 Stars(5)
flashcards Flashcard50 terms
studied byStudied by 32 people
Updated ... ago
5.0 Stars(1)