AP Computer Science Midterm

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

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

0000 1011

11

0000 1111

15

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. What best describes the result of using 7-bit sequences instead of 6-bit sequences?

2 times as many items can be uniquely identified

result of 7 bit sequences instead of 6 bit sequences

2 times as many items can be uniquely identified

every time you add a bit its another

2 to the #

0001 1000

24

0001 1001

25

0001 1011

27

128 bit sequences compared to 32 bit sequences =

2^96 more slots in 128 bit sequences

Internet protocol version 4 (IPv4) represents each IP address as a 32-bit binary number. Internet protocol version 6 (IPv6) represents each IP address as a 128-bit binary number. What best describes the result of using 128-bit addresses instead of 32-bit addresses?

2^96 times as many addresses are available

0001 1111

31

0111

7 0 + 4 + 2 + 1 = 7

0000 1000

8

0000 1001

9

A person wants to transmit an audio file from a device to a second device. What scenario is the best that demonstrates the use of lossless compression of the original file?

A device compresses the audio file before transmitting it to a second device. The seconde device restores the compressed file to its original version before playing it

list

A generic term for a programming data structure that holds multiple items.

string

A sequence of characters

Boolean

A single value of either TRUE or FALSE ; 0 or 1; open or closed

A user wants to save a data file on an online storage site. The user wants to reduce the size of the file, if possible, and wants to be able. to completely restore the file of its original version. What action best supports the user's needs?

Compressing the file using lossless compression algorithm before uploading it

Digital images are often represented by the red, green, and blue values (an RGB triplet) of each individual pixel in the image. A photographer is manipulating a digital image and overwriting the original image. Which of the following describes a lossless transformation of the digital image?

Creating the negative of an image by creating a new RGB triplet for each pixel in which each value is calculated by subtracting the original value from 255. The negative of an image is reversed from the original; light areas appear dark, and colors are reversed

A digital photo file contains data representing the level red, green, and blue for each pixel in the photo. The file also contains metadata that describes the date and geographic location where the photo was taken. For which of the following goals would analyzing the metadata be more appropriate than analyzing the data?

Determining the likelihood that the photo was taken at a particular public event

Suppose a large group of people in a room were all born in the same year. Consider the following three algorithms, which are each intended to identify the people in the room who have the earliest birthday based on just the month and day. For example, a person born on February 10 is considered to have an earlier birthday than a person born on March 5. Which of the three algorithms will identify the correct people?

II only - All the people in the room stand up. All standing people form pairs with another standing person that they have not previously been paired with where possible, leaving at most one person not part of a pair. For each pair, the person with the earliest birthday remains standing, while the other person in the pair sits down. If there is a tie, both people in the remain standing. Any individuals not part of a pair remains standing. Continue doing this until only one person remains standing or all persons standing have the same birthday. Anyone still standing has the earliest birthday

OVER-FLOW ERROR

When a value is placed into a data type without enough bits to handle the value's size.

Internet Protocol (IP)

a protocol for sending data across the Internet that assigns unique numbers (IP addresses) to each connected device

Meta Data

a set of data that describes and gives information about other data.

number

age, dollars, cost

lossless compression algorithm

compresses image and keeps clarity

lossy compression algorithm

compresses the image, but does not keep perfect image clarity

A team of researchers wants to create a program to analyze the amount of pollution reported in roughly 3,000 countries across the United States. The program is intended to combine county data sets and then process the data. What is most likely to be a challenge in creating the program?

different counties may organize data in different ways

zero at the end of ASCII = ex: 1001010

even number

Negative of an image

invert colors *everything that's dark is light, everything that's light is dark

when compressing a file you must

restore a file after decompressing

In a certain computer program, two positive integers are added together, resulting in an overflow error. What is the best explanation of why the error occurred?

the program can only use a fixed number of bits to represent integers; the computed sum is greater than the maximum representable value

ASCII

the universally recognized raw text format that any computer can understand

The list listOne is a sorted list of numbers that contains 700 elements. The list listTwo is a sorted list of numbers that contains 900 elements. Let x represent the maximum number of list elements that will need to be examined when performing a binary search for a value in listOne, and let y represent the maximum number of list elements that will need to be examined when performing a binary search for a value in listTwo. Which of the following statements about x and y is true?

the value of x is approximately equal to the value of y


Ensembles d'études connexes

Chapter 35 --> Geriatric Emergencies

View Set

Chapter 3: Binary and Hexadecimal Numbers

View Set

Osseous Tissue and Bone Structure

View Set

Real Estate Principle (Chpt. 2 Quiz)

View Set

ch 41 intro to anatomy and physiology

View Set

Chapter 2 - Describing Data: Frequency Tables, Frequency Distributions, and Graphic Presentation

View Set

EMT - Chapter 24: Trauma Overview

View Set