AP Computer Science Principles study package
Everything you need to prepare for the AP AP Computer Science Principles exam in one place: course overview, per-unit notes, practice sets, a full-length practice exam with answer key, and a printable summary sheet. Works alongside the timed AP Computer Science Principles practice exam and the score calculator.
Course overview
1AP Computer Science Principles — Complete Course Overview
AP Computer Science Principles (AP CSP) is an introductory college-level computing course that introduces students to the breadth of the field of computer science. Students learn to design and evaluate solutions, develop and implement computer programs, and use computing technology to address problems. The course emphasizes creative problem solving, collaboration, and communication. It is designed to be accessible to students with no prior computing experience while providing enough depth to serve as a foundation for further study.
Exam Format
| Section | Type | # of Questions | Time | Weight |
|---|---|---|---|---|
| Section I | Multiple-Choice Questions | 70 | 120 minutes | 70% |
| Performance Task | Create Performance Task | 1 (student-created) | ~12 hours in-class | 30% |
Note: The Performance Task is completed in class during the school year and submitted to the College Board. The exam day consists only of the 70 MCQs.
Multiple-Choice Section
- 70 questions covering all five Big Ideas
- Questions include both traditional multiple-choice and multiple-select (select two answers)
- Includes pseudocode-based questions, scenario-based questions, and concept-application questions
- Approximately 1 minute 43 seconds per question
- Single-select questions have 4 answer choices (A–D)
- Multiple-select questions require you to choose exactly 2 correct answers
Performance Task (Create Task)
- Students develop a computer program of their own choice
- Must include: abstraction (a procedure with at least one parameter), a sequence, a selection, an iteration, and a list (collection)
- Students submit: program code, a video demonstration (1-2 minutes), and written responses
- Written responses address: program purpose, functionality, abstraction, and algorithmic efficiency
- Completed during class time over approximately 12 hours of classwork
Course Structure: Five Big Ideas
Big Idea 1: Creative Development (10–13% of exam)
Collaborating, designing, and developing programs. Computing innovations. Program design, development, and debugging. Documentation and team-based development.
Big Idea 2: Data (17–22% of exam)
Data representation in binary. Data compression (lossy vs. lossless). Large data sets. Analyzing and interpreting data. Privacy and security of data.
Big Idea 3: Algorithms and Programming (30–35% of exam)
Variables, expressions, and assignment. Control flow: sequencing, selection (IF/ELSE), iteration (loops). Procedures with parameters and return values. Libraries and APIs. Algorithms: linear search, binary search. Simulating and testing. Algorithm efficiency: polynomial vs. exponential growth.
Big Idea 4: Computing Systems and Networks (11–15% of exam)
Hardware components. The Internet: protocols (TCP/IP, HTTP, HTTPS). Routing, packets, fault tolerance. Cybersecurity: encryption, public key cryptography, malware, firewalls, and VPNs.
Big Idea 5: Impact of Computing (21–26% of exam)
Computing innovations and their effects. Beneficial and harmful effects. Digital divide. Digital footprint. Intellectual property. crowdsourcing and citizen science. Safe and ethical computing.
Study File Index
| File | Description |
|---|---|
| 00-Course-Overview.md | This file — course structure and exam format |
| 01-BigIdea1-Notes-Creative-Development.md | Comprehensive notes for Big Idea 1 |
| 02-BigIdea2-Notes-Data.md | Comprehensive notes for Big Idea 2 |
| 03-BigIdea3-Notes-Algorithms-Programming.md | Comprehensive notes for Big Idea 3 |
| 04-BigIdea4-Notes-Systems-Networks.md | Comprehensive notes for Big Idea 4 |
| 05-BigIdea5-Notes-Impact-Computing.md | Comprehensive notes for Big Idea 5 |
| 06-BigIdea1-Practice.md | Practice questions for Big Idea 1 |
| 07-BigIdea2-Practice.md | Practice questions for Big Idea 2 |
| 08-BigIdea3-Practice.md | Practice questions for Big Idea 3 |
| 09-BigIdea4-Practice.md | Practice questions for Big Idea 4 |
| 10-BigIdea5-Practice.md | Practice questions for Big Idea 5 |
| 11-Practice-Exam-Answers.md | Full practice exam with answer key |
| 12-Summary-Sheet.md | Condensed summary of all key concepts |
| 13-Audio-Script.md | Script for audio review recording |
Grading Scale (Approximate)
- 5: Extremely well qualified (typically 65–75% of total points)
- 4: Well qualified (typically 55–65%)
- 3: Qualified (typically 45–55%)
- 2: Possibly qualified (35–45%)
- 1: No recommendation (below 35%)
Key Exam Reminders
- Pseudocode on the exam uses its own AP-style notation — learn it well
- Multiple-select questions are common — you must select EXACTLY two answers
- The exam tests conceptual understanding, not syntax of any specific language
- Know how to trace through code (especially pseudocode) by hand
- Binary and hexadecimal conversions appear frequently
- Algorithm efficiency (comparing running times) is heavily tested
Unit notes
5Big Idea 1: Creative Development
Computing Innovations
A computing innovation is a program, computing innovation as a whole, or computing innovation in the world. This broad definition encompasses everything from a mobile app to a social media platform to a self-driving car system to a new encryption algorithm. Computing innovations can be physical devices, software applications, systems, or even conceptual frameworks that leverage computing to solve problems or create new capabilities.
Every computing innovation begins with a problem or opportunity that a person or team identifies. The creative development process involves several key stages:
Identifying the Problem
Before any code is written, developers must clearly understand the problem they are trying to solve. This involves:
- Defining the scope and requirements of the solution
- Identifying the target users and their needs
- Determining the constraints (technical, economic, social, ethical)
- Establishing success criteria
A well-defined problem statement is critical. "Build an app" is not a problem statement. "Build a mobile application that helps high school students track their homework assignments and receive reminders before deadlines" is a specific, actionable problem statement.
Exploring Solutions
Once the problem is defined, developers brainstorm potential solutions. This creative phase may involve:
- Researching existing solutions and identifying their strengths and weaknesses
- Brainstorming multiple approaches before selecting one
- Considering different computing paradigms (procedural, object-oriented, event-driven)
- Evaluating tradeoffs between different approaches
Program Design
Good program design follows established principles:
Modularity: Breaking a large program into smaller, self-contained modules (procedures, functions, or objects) that each handle a specific task. Modularity makes programs easier to understand, test, debug, and modify.
Abstraction: Hiding complex implementation details behind a simpler interface. When you call a function to sort a list, you do not need to know the specific algorithm it uses — you only need to know what it does (sorts the list) and how to use it (pass the list as a parameter).
Top-down design: Starting with the overall problem and breaking it down into smaller, more manageable sub-problems. Each sub-problem is then further decomposed until the sub-problems are simple enough to implement directly.
Collaborative Development
Modern software development is overwhelmingly collaborative. Teams of developers work together to design, implement, test, and maintain software systems. Effective collaboration requires:
Version Control
Version control systems (VCS) track changes to code over time, allowing multiple developers to work on the same project simultaneously without overwriting each other's work. The most widely used version control system is Git, which is typically used with online hosting platforms like GitHub, GitLab, or Bitbucket.
Key concepts in version control:
- Repository (repo): The project folder tracked by version control
- Commit: A saved snapshot of the code at a point in time
- Branch: A parallel version of the code where changes can be made without affecting the main version
- Merge: Combining changes from one branch into another
- Pull request: A request to merge changes, typically reviewed by team members before acceptance
Pair Programming
Pair programming is a collaborative technique in which two developers work together at one computer. One developer (the driver) writes the code while the other (the navigator) reviews each line as it is written, thinks strategically about the overall direction, and identifies potential issues. Partners switch roles frequently.
Code Review
Code review is the process of having other developers examine your code for errors, security vulnerabilities, performance issues, and adherence to coding standards. Code reviews improve code quality and spread knowledge across the team.
Program Development Process
Writing Code
The development process typically involves writing code in a high-level programming language. The AP CSP exam uses pseudocode — a simplified, language-agnostic notation that represents the logical structure of a program. Understanding AP pseudocode is essential for the exam.
Debugging
Debugging is the process of finding and fixing errors (bugs) in a program. There are three main types of errors:
- Syntax errors: Errors in the code's grammar or structure that prevent it from running. Examples include missing parentheses, misspelled keywords, or incorrect indentation. Syntax errors are typically caught by the programming language's compiler or interpreter.
- Runtime errors: Errors that occur while the program is running. Examples include dividing by zero, accessing a list element at an index that does not exist, or attempting to open a file that does not exist. Runtime errors cause the program to crash or produce unexpected behavior.
- Logic errors: Errors in the program's logic that cause it to produce incorrect results, even though it runs without crashing. Logic errors are the most difficult to find because the program appears to work — it just gives the wrong answer. Examples include using the wrong formula, an incorrect comparison operator, or an off-by-one error in a loop.
Testing
Testing is the process of running a program with various inputs to verify that it produces the expected outputs. Good testing practices include:
- Testing with typical inputs (normal cases)
- Testing with boundary values (edge cases, such as 0, 1, maximum values, minimum values)
- Testing with invalid inputs (to ensure the program handles errors gracefully)
- Testing with extreme inputs (very large or very small values)
Documentation
Documentation is written text that explains what a program does, how it works, and how to use it. Good documentation is essential for:
- Helping other developers understand and modify the code
- Explaining the purpose and parameters of procedures
- Providing instructions for users
- Recording design decisions and their rationale
Types of documentation include:
- Comments: Explanatory text embedded within the code (ignored by the computer when running)
- API documentation: Formal descriptions of procedures, parameters, return values, and behavior
- User manuals: Instructions for end users
- README files: Project overview and setup instructions
The Create Performance Task
The AP CSP Create Performance Task requires you to develop a program of your own choosing. The program must include:
- A sequence: At least two lines of code executed in order
- A selection: An IF or IF-ELSE statement that makes a decision
- An iteration: A loop (REPEAT, FOR, or WHILE) that repeats code
- A list: A data structure that stores multiple values
- A procedure with at least one parameter: A named, reusable block of code that takes input
You submit:
- Your program code
- A 1-2 minute video demonstrating the program running
- Written responses addressing the program's purpose, functionality, abstraction, and algorithmic efficiency
Tips for the Create Task
- Choose a project you are genuinely interested in — motivation matters
- Keep the scope manageable. A simple, well-functioning program scores better than an ambitious, buggy one
- Make sure ALL five required elements are clearly present and identifiable
- Document your code with comments explaining what each section does
- For the written responses, use precise vocabulary (abstraction, parameter, return value, iteration)
- Test your program thoroughly before recording the video
- Practice explaining your code out loud before writing your responses
Key Terms for Big Idea 1
| Term | Definition |
|---|---|
| Computing innovation | A program or computing system including its intended purpose and effects |
| Pseudocode | A simplified notation for representing the logic of a program |
| Modularity | Dividing a program into separate, self-contained modules |
| Abstraction | Hiding implementation details behind a simpler interface |
| Debugging | The process of finding and fixing errors in a program |
| Syntax error | A grammatical error that prevents code from running |
| Runtime error | An error that occurs while a program is executing |
| Logic error | An error in program logic that produces incorrect results |
| Version control | A system for tracking changes to code over time |
| Comments | Explanatory text in code that is ignored when the program runs |
Big Idea 2: Data
Binary Number System
All data in a computer is ultimately represented as binary — sequences of 0s and 1s. This is because computers are built from billions of tiny electronic switches called transistors, which can be in one of two states: on (1) or off (0). Every piece of data — text, images, audio, video, numbers — is encoded as binary.
Binary Basics
The binary (base-2) number system uses only two digits: 0 and 1. Each position in a binary number represents a power of 2, starting from the right with 2^0 (which equals 1).
| Position | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|
| Power of 2 | 2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
| Decimal value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
To convert binary to decimal, add the decimal values of each position that contains a 1. For example, binary 1011 = 8 + 0 + 2 + 1 = 11 in decimal.
To convert decimal to binary, repeatedly divide by 2 and record the remainders from bottom to top.
Bits, Bytes, and Larger Units
- A bit is a single binary digit (0 or 1)
- A byte is 8 bits — can represent 256 (2^8) different values
- A kilobyte (KB) is approximately 1,000 bytes (technically 1,024 = 2^10)
- A megabyte (MB) is approximately 1,000,000 bytes (technically 2^20)
- A gigabyte (GB) is approximately 1,000,000,000 bytes (technically 2^30)
- A terabyte (TB) is approximately 1,000,000,000,000 bytes (technically 2^40)
Representing Data in Binary
Integers: Integers are stored in binary using a fixed number of bits. An 8-bit unsigned integer can represent values from 0 to 255. A 16-bit unsigned integer can represent 0 to 65,535.
Negative numbers: The two's complement method is the most common way to represent negative integers. In two's complement, the leftmost bit is the sign bit (0 for positive, 1 for negative). An 8-bit two's complement integer can represent values from -128 to 127.
Text (ASCII and Unicode): Text characters are represented using encoding schemes. ASCII (American Standard Code for Information Interchange) uses 7 bits to represent 128 characters (English letters, digits, punctuation, control characters). Unicode uses up to 32 bits and can represent over 140,000 characters from virtually every writing system in the world.
Images (Pixels and RGB): Digital images are composed of pixels (picture elements), each of which is a tiny square of color. Each pixel's color is represented using a combination of red, green, and blue (RGB) values, each ranging from 0 to 255 (8 bits each). A 24-bit color image uses 3 bytes per pixel (8 bits × 3 colors). An image that is 1920 × 1080 pixels contains over 2 million pixels and requires approximately 6 MB of storage at 24-bit color depth.
Audio: Sound waves are sampled at regular intervals (the sampling rate), and each sample is recorded as a binary number representing the amplitude (loudness) of the sound wave at that moment. CD-quality audio uses a sampling rate of 44,100 samples per second with 16 bits per sample.
Hexadecimal Number System
Hexadecimal (base-16) is a number system that uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). Hexadecimal is commonly used in computing because it provides a more compact representation of binary data — each hexadecimal digit corresponds to exactly 4 bits (one nibble).
| Binary | Hex | Decimal |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
To convert binary to hex, group the binary digits into groups of 4 (from right to left) and convert each group to its hexadecimal equivalent. For example, binary 11010111 = 1101 0111 = D7 in hexadecimal.
Data Compression
Data compression reduces the number of bits needed to represent data, saving storage space and reducing transmission time. There are two fundamental types of compression:
Lossless Compression
Lossless compression reduces file size without losing any data. The original data can be perfectly reconstructed from the compressed version. This is essential for data where any loss of information is unacceptable:
- Text files (a single changed bit could change a character)
- Executable programs (a single changed bit could cause a crash)
- Medical images (where accuracy is critical)
- Financial records
Common lossless compression methods include:
- Run-length encoding (RLE): Replaces consecutive identical values with a count and a single value. For example, AAAAABBBC would be compressed to 5A3B1C. This is effective for data with long runs of repeated values.
- Huffman coding: Uses variable-length codes, assigning shorter codes to more frequently occurring values and longer codes to less frequent values. This reduces the total number of bits needed.
Lossy Compression
Lossy compression reduces file size by permanently eliminating some data. The original data CANNOT be perfectly reconstructed. Lossy compression is used when some data loss is acceptable in exchange for much smaller file sizes:
- Images: JPEG format uses lossy compression. The algorithm removes visual information that the human eye is least likely to notice.
- Audio: MP3 and AAC formats use lossy compression, removing frequencies that are difficult for humans to hear.
- Video: H.264 and other video codecs use lossy compression, combining spatial compression (within frames) and temporal compression (between frames).
The key distinction for the exam: lossless preserves the original data perfectly; lossy does not. If the question asks whether the original can be recovered, the answer depends on whether lossless or lossy compression was used.
Large Data Sets
Modern computing often involves working with extremely large data sets — billions of records, terabytes of information. Analyzing large data sets enables:
- Pattern discovery: Identifying trends, correlations, and anomalies that would be invisible in smaller data sets
- Prediction: Using historical data to make predictions about future events
- Decision-making: Basing decisions on evidence rather than intuition
Challenges of large data sets:
- Storage requirements
- Processing time
- Data quality (errors, missing values, biases)
- Privacy concerns
- The need for computational tools and algorithms designed for large-scale data
Data Bias
Large data sets can reflect and amplify existing biases in society. If the data used to train a machine learning system contains biased information, the system will produce biased outputs. For example, if a facial recognition system is trained primarily on light-skinned faces, it may be significantly less accurate for dark-skinned faces. This is not a technical failure — it is a data problem that reflects social inequality.
Privacy and Security of Data
Data Privacy
Data privacy refers to the right of individuals to control how their personal information is collected, stored, used, and shared. Key concerns include:
- Personal data: Names, addresses, phone numbers, email addresses, Social Security numbers, medical records, financial information
- Metadata: Data about data — for example, the time, location, and device used to send a message
- Digital footprint: The trail of data a person creates through online activities
Data Security
Data security involves protecting data from unauthorized access, use, or modification. Key concepts include:
- Authentication: Verifying the identity of a user (passwords, biometrics, two-factor authentication)
- Authorization: Determining what an authenticated user is allowed to do (access control)
- Encryption: Converting data into an unreadable form that can only be decrypted with the correct key
Key Terms for Big Idea 2
| Term | Definition |
|---|---|
| Analog data | Continuous data (e.g., sound waves, temperature) |
| Digital data | Discrete data represented as binary |
| Sampling rate | Number of samples per second when converting analog to digital |
| Lossless compression | Compression that allows perfect reconstruction of the original |
| Lossy compression | Compression that permanently removes some data |
| Metadata | Data that describes other data |
| Digital divide | The gap between those who have access to computing technology and those who do not |
| Encryption | The process of encoding data so that only authorized parties can read it |
| PII (Personally Identifiable Information) | Data that can identify a specific individual |
| Phishing | A social engineering attack that tricks users into revealing sensitive information |
Big Idea 3: Algorithms and Programming
This is the most heavily weighted Big Idea on the exam. Master the concepts in this section thoroughly.
Variables, Expressions, and Assignment
Variables
A variable is a named storage location in a program that holds a value. Variables allow programs to store, retrieve, and manipulate data. In AP pseudocode, variables are assigned using the arrow operator (←):
score ← 0
name ← "Alice"
found ← FALSE
Data Types
Variables can hold different types of data:
- Integer: Whole numbers (e.g., 5, -3, 0, 42)
- String (text): Sequences of characters enclosed in quotes (e.g., "Hello", "AP CSP")
- Boolean: Logical values — TRUE or FALSE
- Floating-point (real): Numbers with decimal parts (e.g., 3.14, -0.5, 100.0)
Expressions and Operators
An expression is a combination of values, variables, and operators that evaluates to a single value.
Arithmetic operators:
+Addition-Subtraction*Multiplication/DivisionMODModulo (remainder after division; e.g., 17 MOD 5 = 2)Comparison (relational) operators — evaluate to TRUE or FALSE:
=Equal to≠Not equal to>Greater than<Less than≥Greater than or equal to≤Less than or equal toBoolean (logical) operators:
AND— TRUE only if BOTH operands are TRUEOR— TRUE if AT LEAST ONE operand is TRUENOT— Reverses the truth value (TRUE becomes FALSE, FALSE becomes TRUE)
String Operations
- Concatenation: Joining strings together using the
+operator. "Hello" + " " + "World" = "Hello World" - Length: The number of characters in a string
- Substring: Extracting a portion of a string
Control Flow
Sequencing
Sequencing is the execution of statements in the order they appear, one after another. This is the most basic form of program execution.
x ← 5
y ← 10
sum ← x + y -- sum is now 15
DISPLAY sum -- outputs 15
Selection
Selection (also called branching) allows a program to choose between different paths of execution based on a condition. The condition is a Boolean expression that evaluates to TRUE or FALSE.
IF statement:
IF (temperature > 90)
{
DISPLAY("It's hot outside!")
}
IF-ELSE statement:
IF (score ≥ 60)
{
DISPLAY("Pass")
}
ELSE
{
DISPLAY("Fail")
}
Nested IF-ELSE (an IF-ELSE inside another IF-ELSE) allows for multiple conditions:
IF (grade ≥ 90)
{
DISPLAY("A")
}
ELSE
{
IF (grade ≥ 80)
{
DISPLAY("B")
}
ELSE
{
DISPLAY("C or below")
}
}
Iteration
Iteration (also called looping) allows a program to repeat a block of code multiple times. There are three types of loops in AP CSP:
REPEAT n TIMES loop — repeats exactly n times:
REPEAT 5 TIMES
{
DISPLAY("Hello") -- prints "Hello" 5 times
}
REPEAT UNTIL (condition) loop — repeats until the condition becomes TRUE:
counter ← 0
REPEAT UNTIL (counter = 5)
{
DISPLAY(counter)
counter ← counter + 1 -- prints 0, 1, 2, 3, 4
}
FOR EACH loop — iterates through each element in a list:
FOR EACH item IN shoppingList
{
DISPLAY(item)
}
Important: A REPEAT UNTIL loop checks the condition AFTER each iteration (it always runs at least once). This is different from a WHILE loop (which checks BEFORE), though AP pseudocode uses REPEAT UNTIL as its primary loop construct.
Lists (Collections)
A list (also called an array or collection) is an ordered collection of elements that can be accessed by their index (position). In AP CSP, list indices start at 1 (not 0 as in most programming languages).
fruits ← ["apple", "banana", "cherry", "date"]
DISPLAY(fruits[1]) -- outputs "apple"
DISPLAY(fruits[3]) -- outputs "cherry"
List Operations
- Accessing elements:
list[index] - Assigning elements:
list[2] ← "grape" - Inserting elements:
INSERT(list, 2, "orange")— inserts "orange" at position 2, shifting existing elements right - Appending elements:
APPEND(list, "elderberry")— adds to the end - Removing elements:
REMOVE(list, 3)— removes element at position 3, shifting remaining elements left - Length:
LENGTH(list)— returns the number of elements
Common List Algorithms
Finding the maximum value:
maxVal ← list[1]
FOR EACH item IN list
{
IF (item > maxVal)
{
maxVal ← item
}
}
DISPLAY(maxVal)
Computing the sum:
sum ← 0
FOR EACH item IN list
{
sum ← sum + item
}
DISPLAY(sum)
Counting elements that satisfy a condition:
count ← 0
FOR EACH item IN list
{
IF (item > 0)
{
count ← count + 1
}
}
DISPLAY(count)
Procedures
A procedure (also called a function or method) is a named, reusable block of code that performs a specific task. Procedures are a fundamental form of abstraction — they allow programmers to use complex functionality without needing to understand the implementation details.
Parameters and Arguments
A parameter is a variable in a procedure that receives a value when the procedure is called. An argument is the actual value passed to the procedure when it is called.
PROCEDURE greet(name)
{
DISPLAY("Hello, " + name + "!")
}
greet("Alice") -- name receives the value "Alice"
greet("Bob") -- name receives the value "Bob"
In this example, name is a parameter. When we call greet("Alice"), the argument "Alice" is passed to the parameter name.
Return Values
A procedure can return a value to the code that called it. The returned value can be stored in a variable, used in an expression, or displayed.
PROCEDURE square(x)
{
RETURN (x * x)
}
result ← square(5) -- result is 25
DISPLAY(square(3)) -- displays 9
Procedures that return values are sometimes called functions. Procedures that do not return values perform an action (side effect) such as displaying output or modifying a list.
Procedural Abstraction
Procedural abstraction allows a programmer to use a procedure without knowing how it is implemented. You can call DISPLAY() without knowing the complex process by which the computer sends pixels to a screen. You can call a sorting procedure without knowing whether it uses merge sort, quick sort, or another algorithm. This simplifies programming by hiding complexity.
Libraries
A library is a collection of pre-written procedures and code that programmers can use in their programs. Using libraries saves time, reduces errors, and promotes code reuse.
APIs (Application Programming Interfaces)
An API defines how a program can interact with another program, service, or library. APIs specify the procedures that are available, the parameters they accept, and the values they return. Using an API is another form of abstraction — you use the API's procedures without needing to understand their implementation.
Searching Algorithms
Linear Search
A linear search examines each element in a list one by one until the target is found or the end of the list is reached.
found ← FALSE
FOR EACH item IN list
{
IF (item = target)
{
found ← TRUE
}
}
- Works on both sorted and unsorted lists
- In the worst case, examines every element
- Time complexity: O(n) — proportional to the number of elements
Binary Search
A binary search finds a target value in a sorted list by repeatedly dividing the search range in half.
- Compare the target with the middle element
- If the target equals the middle element, we are done
- If the target is less than the middle element, search the left half
- If the target is greater than the middle element, search the right half
- Repeat until found or the range is empty
- Only works on sorted lists
- Time complexity: O(log n) — much faster than linear search for large lists
- Each comparison eliminates half of the remaining elements
Algorithm Efficiency and Running Time
Comparing Algorithm Efficiency
Algorithms can be compared by their running time — how the number of steps grows as the size of the input (n) increases.
- Constant time O(1): The number of steps does not depend on the input size. Example: accessing an element in a list by index.
- Logarithmic time O(log n): The number of steps grows logarithmically. Example: binary search.
- Linear time O(n): The number of steps is proportional to the input size. Example: linear search, computing the sum of a list.
- Polynomial time O(n²): The number of steps is proportional to the square of the input size. Example: a nested loop that compares each element with every other element.
- Exponential time O(2ⁿ): The number of steps doubles with each additional input element. Example: checking all possible combinations. These algorithms become impractical for large inputs.
Decidable vs. Undecidable Problems
A decidable problem is one for which an algorithm can be written that will always produce a correct answer in a finite amount of time. An undecidable problem is one for which no algorithm can always produce a correct answer. The Halting Problem (determining whether any given program will eventually stop running) is a famous undecidable problem.
Simulation
A simulation is a program that models a real-world process or system. Simulations allow us to study complex systems that would be too expensive, dangerous, or impractical to study directly.
Examples of simulations:
- Weather forecasting models
- Flight simulators for pilot training
- Epidemiological models of disease spread
- Traffic flow simulations
- Physics engines in video games
Limitations of simulations: A simulation is only as good as its model. If the model does not accurately represent reality, the simulation's predictions will be unreliable. Simulations may not account for rare or unexpected events ("black swan" events). The results of a simulation should always be validated against real-world data when possible.
Key Terms for Big Idea 3
| Term | Definition |
|---|---|
| Algorithm | A finite set of instructions that solve a problem or accomplish a task |
| Iteration | Repeating a block of code multiple times |
| Selection | Choosing between different paths based on a condition |
| Procedure | A named, reusable block of code |
| Parameter | A variable in a procedure that receives a value from an argument |
| Return value | The value a procedure sends back to the calling code |
| Linear search | Examines each element sequentially; O(n) |
| Binary search | Divides sorted list in half repeatedly; O(log n) |
| Abstraction | Hiding complexity behind a simpler interface |
| Heuristic | An approach that may not guarantee the correct answer but is practical |
Big Idea 4: Computing Systems and Networks
Components of a Computing System
A computing system consists of hardware, software, and the users who interact with them.
Hardware
Central Processing Unit (CPU): The "brain" of the computer that executes instructions. The CPU performs arithmetic and logical operations, moves data between memory locations, and controls the other components of the system. Modern CPUs contain billions of transistors and can execute billions of instructions per second.
Memory (RAM): Random Access Memory is the computer's short-term memory. It stores the data and instructions that the CPU is currently using. RAM is volatile — it loses its contents when the computer is powered off. It is much faster than storage but has limited capacity.
Storage: Long-term, non-volatile memory that retains data even when the computer is powered off. Types include:
- Hard Disk Drives (HDD): Use spinning magnetic disks; large capacity, lower cost, slower
- Solid State Drives (SSD): Use flash memory; faster, more durable, more expensive per gigabyte
- Flash drives/USB drives: Portable solid-state storage
Input devices: Allow users to send data to the computer — keyboard, mouse, microphone, camera, touchscreen, scanner
Output devices: Present data from the computer to the user — monitor, speakers, printer, projector
Software
- Operating System (OS): Manages the computer's hardware, provides a user interface, and runs applications (Windows, macOS, Linux, iOS, Android)
- Application software: Programs designed for end users (web browsers, word processors, games)
- System software: Programs that manage the computer system (device drivers, utilities)
The Internet
The Internet is a global network of interconnected computer networks that communicate using standardized protocols. It is not controlled by any single entity — it is a decentralized, distributed system that has grown organically over decades.
How Data Travels: Packets
When you send data over the Internet (an email, a web page request, a video stream), the data is not sent as a single continuous stream. Instead, it is broken into small chunks called packets. Each packet contains:
- A portion of the data being sent
- The destination address
- The source address
- Sequence information (to reassemble packets in the correct order)
- Error-checking information
Packets may travel different routes across the Internet and may arrive out of order. The receiving computer uses the sequence information to reassemble them correctly. This packet switching approach makes the Internet efficient and fault-tolerant — if one route is congested or fails, packets can be rerouted through alternative paths.
Protocols
A protocol is a set of rules that governs how data is transmitted between devices. The Internet relies on a layered system of protocols:
- TCP/IP (Transmission Control Protocol / Internet Protocol): The foundational protocols of the Internet. IP handles addressing and routing (where packets go), while TCP handles reliable delivery (ensuring packets arrive correctly and in order).
- HTTP (Hypertext Transfer Protocol): The protocol used for transmitting web pages. When you type a URL into your browser, it sends an HTTP request to the web server, which responds with the web page content.
- HTTPS (HTTP Secure): HTTP combined with encryption (TLS/SSL). HTTPS encrypts the data transmitted between your browser and the web server, protecting it from eavesdropping. Modern websites should always use HTTPS.
- DNS (Domain Name System): Translates human-readable domain names (like www.google.com) into IP addresses (like 142.250.80.46) that computers use to identify each other. DNS functions like a phone book for the Internet.
IP Addresses
Every device connected to the Internet has an IP address — a unique numerical identifier. There are two versions:
- IPv4: Uses 32-bit addresses (approximately 4.3 billion unique addresses). Written in dotted decimal notation (e.g., 192.168.1.1). The supply of IPv4 addresses has been exhausted.
- IPv6: Uses 128-bit addresses (approximately 3.4 × 10^38 unique addresses). Written in hexadecimal notation (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). IPv6 provides more than enough addresses for the foreseeable future.
Routing
Routers are devices that forward packets between networks. When a packet needs to travel from your computer to a server on another continent, it passes through multiple routers, each of which examines the packet's destination address and determines the best next hop. Routers use routing tables and routing algorithms to make these decisions.
Fault Tolerance and Redundancy
Fault tolerance is the ability of a system to continue functioning even when some components fail. The Internet is highly fault-tolerant because of its decentralized, packet-switched design.
Redundancy is the inclusion of extra components or backup systems that can take over if the primary system fails. Examples:
- Redundant hard drives in RAID configurations
- Backup power supplies
- Multiple network paths between two points
- Data backup systems
The Internet was originally designed (by the U.S. Department of Defense's ARPANET project) to be fault-tolerant — to survive nuclear attacks that might destroy individual nodes. This design principle remains fundamental to how the Internet works today.
Cybersecurity
Cybersecurity is the practice of protecting computing systems, networks, and data from unauthorized access, theft, damage, or disruption.
Types of Threats
Malware: Malicious software designed to harm or exploit computers. Types include:
- Virus: Attaches to legitimate programs and spreads when the program runs
- Worm: Spreads independently by exploiting network vulnerabilities
- Trojan horse: Disguised as legitimate software but performs harmful actions
- Ransomware: Encrypts the victim's files and demands payment for the decryption key
- Spyware: Secretly monitors the user's activity and collects information
Phishing: A social engineering attack that uses fraudulent emails, websites, or messages to trick users into revealing passwords, credit card numbers, or other sensitive information. Phishing attacks exploit human psychology rather than technical vulnerabilities.
DDoS (Distributed Denial of Service): An attack that floods a server or network with traffic from many compromised computers (a "botnet"), overwhelming its capacity and preventing legitimate users from accessing it.
Man-in-the-middle attack: An attacker intercepts communications between two parties, potentially reading or modifying the data in transit.
Encryption
Encryption is the process of converting readable data (plaintext) into an unreadable form (ciphertext) using a mathematical algorithm and a key. Only someone with the correct key can decrypt the ciphertext back into plaintext.
Symmetric encryption uses the same key for both encryption and decryption. Both the sender and receiver must have the same secret key. This creates a key distribution problem — how do you securely share the key?
Public key (asymmetric) encryption uses two mathematically related keys: a public key (shared openly) and a private key (kept secret). Data encrypted with the public key can only be decrypted with the private key, and vice versa.
Common uses of public key encryption:
- Secure web browsing (HTTPS): Your browser uses the website's public key to establish an encrypted connection
- Digital signatures: A sender encrypts a message hash with their private key; anyone can verify it using the sender's public key
- Secure email (PGP, S/MIME): Encrypting email so only the intended recipient can read it
Security Measures
- Firewalls: Hardware or software that monitors and controls network traffic based on security rules
- VPNs (Virtual Private Networks): Create encrypted tunnels between a device and a remote server, protecting data in transit
- Two-factor authentication (2FA): Requires two forms of identification (e.g., password + code sent to phone)
- Antivirus software: Detects and removes malware
- Software updates: Patch known security vulnerabilities
Key Terms for Big Idea 4
| Term | Definition |
|---|---|
| Bandwidth | The maximum rate of data transfer across a network path |
| Latency | The time it takes for data to travel from source to destination |
| Packet switching | Breaking data into packets that travel independently across the network |
| Protocol | A set of rules governing data transmission |
| Fault tolerance | The ability to continue functioning despite component failures |
| Phishing | Tricking users into revealing sensitive information |
| Encryption | Converting data to an unreadable form using a key |
| Public key encryption | Uses paired public and private keys for encryption/decryption |
| Firewall | Software/hardware that controls network traffic based on security rules |
| BitTorrent | A peer-to-peer file sharing protocol that distributes data across many users |
Big Idea 5: Impact of Computing
Effects of Computing Innovations
Every computing innovation has effects — both beneficial and harmful — on society, the economy, and culture. The AP CSP exam consistently asks you to identify, explain, and evaluate these effects.
Beneficial Effects
Computing innovations have transformed virtually every aspect of modern life:
- Communication: Social media, video conferencing, instant messaging connect people across the globe
- Healthcare: Electronic health records, telemedicine, medical imaging, drug discovery through computational biology
- Education: Online learning platforms, educational apps, adaptive learning systems, access to information
- Economic productivity: Automation, e-commerce, supply chain optimization, financial technology
- Scientific research: Computational modeling, big data analysis, collaborative research tools
- Convenience: Online banking, navigation apps, ride-sharing, food delivery, smart home devices
Harmful Effects
Computing innovations can also cause significant harm:
- Privacy erosion: Surveillance, data mining, loss of control over personal information
- Job displacement: Automation and AI replacing human workers in manufacturing, retail, transportation, and even professional fields
- Social media harms: Cyberbullying, addiction, misinformation, echo chambers, mental health impacts on adolescents
- Security threats: Identity theft, financial fraud, cyberattacks on critical infrastructure
- Algorithmic bias: Systems that discriminate against certain groups due to biased training data or flawed design
- Digital divide: Unequal access to technology reinforcing existing social and economic inequalities
- Environmental impact: Energy consumption of data centers, electronic waste, resource extraction for device manufacturing
Unintended Consequences
Many harmful effects are unintended consequences — negative outcomes that were not anticipated by the innovators. The creators of social media platforms did not intend for their products to facilitate misinformation campaigns or contribute to adolescent mental health crises. Recognizing that innovations can have unintended consequences is essential for responsible computing.
The Digital Divide
The digital divide is the gap between demographics and regions that have access to modern information and communications technology and those that do not have access. The digital divide has multiple dimensions:
- Access divide: Some communities lack physical access to the Internet, computers, or mobile devices due to geography (rural areas), economics (poverty), or infrastructure limitations.
- Skill divide: Even when technology is available, some individuals lack the digital literacy skills to use it effectively.
- Usage divide: People with similar access may use technology in very different ways — some for productive purposes (education, job searching, civic engagement) and others primarily for entertainment.
The digital divide exacerbates existing social inequalities. Students without reliable Internet access cannot complete online homework assignments. Job seekers without digital skills cannot access the growing number of jobs that require computer proficiency. Communities without broadband connectivity cannot attract technology-dependent businesses.
Bridging the digital divide requires investment in infrastructure (broadband expansion), affordable device programs, digital literacy education, and culturally relevant content and applications.
Digital Footprint
A digital footprint is the trail of data a person creates through their use of digital technology. Digital footprints include:
Passive Digital Footprint
Data collected without the user's explicit action:
- Browsing history and search queries
- Location data from mobile devices
- Purchase records and financial transactions
- Social media interactions (likes, shares, comments)
- Device information and IP addresses
Active Digital Footprint
Data a person deliberately shares:
- Social media posts and profile information
- Emails and messages
- Uploaded photos and videos
- Blog posts and forum comments
- Online reviews and ratings
Persistence and Searchability
Digital data is persistent — it is very difficult to completely delete information once it has been published or collected online. Even deleted social media posts may have been copied, screenshotted, or archived by third parties. Digital data is also searchable — search engines make it easy for anyone to find information about a person from their digital footprint.
Managing Your Digital Footprint
- Assume everything you post online is permanent and public
- Review privacy settings on social media regularly
- Be mindful of what you share and with whom
- Use strong, unique passwords and enable two-factor authentication
- Think about how your online presence might be perceived by future employers, colleges, or others
Intellectual Property
Intellectual property (IP) refers to creations of the mind — inventions, literary and artistic works, designs, symbols, names, and images used in commerce. Computing raises complex questions about intellectual property:
Types of Intellectual Property Protection
- Copyright: Protects original works of authorship (software code, music, books, videos). Copyright is automatic upon creation and lasts for the creator's lifetime plus 70 years.
- Patent: Protects inventions and processes for 20 years. Software can be patented in some jurisdictions.
- Trademark: Protects brand names, logos, and slogans.
- Trade secret: Protects confidential business information.
Creative Commons
Creative Commons is a licensing system that allows creators to specify how their work can be used by others. Creative Commons licenses range from very permissive (allow any use with attribution) to more restrictive (non-commercial use only, no derivative works).
Open Source Software
Open source software is software whose source code is made available to the public, allowing anyone to view, modify, and distribute it. Open source promotes collaboration, transparency, and innovation. Examples include the Linux operating system, the Firefox web browser, and the Python programming language.
Fair Use
Fair use is a legal doctrine that allows limited use of copyrighted material without permission for purposes such as criticism, commentary, news reporting, teaching, and research. Determining fair use involves considering the purpose, nature, amount, and effect on the market.
Crowdsourcing and Citizen Science
Crowdsourcing
Crowdsourcing is the practice of obtaining information, ideas, or services from a large group of people, typically via the Internet. Computing innovations enable crowdsourcing at unprecedented scale.
Examples:
- Wikipedia: Encyclopedia articles written and edited by volunteers worldwide
- Waze: Navigation app that uses real-time traffic data reported by its users
- Kickstarter: Crowdfunding platform that aggregates small contributions from many people
- reCAPTCHA: Uses human responses to CAPTCHAs to digitize books and train AI systems
Citizen Science
Citizen science involves members of the public participating in scientific research, often by collecting or analyzing data. Computing platforms enable citizen science at global scale:
- eBird: Birders worldwide submit bird sightings, creating a massive ecological database
- Foldit: A puzzle game that crowdsources protein folding solutions, contributing to biochemical research
- Zooniverse: A platform hosting many citizen science projects across disciplines
Safe Computing and Ethics
Legal and Ethical Considerations
- Licensing and attribution: Software and creative works should be used in accordance with their licenses. Proper attribution should be given.
- Data privacy laws: Regulations like GDPR (European Union) and CCPA (California) give individuals rights over their personal data.
- Accessibility: Computing innovations should be designed to be accessible to people with disabilities.
- Sustainability: The environmental impact of computing (energy use, e-waste) should be considered.
Ethical Decision-Making Framework
When evaluating a computing innovation, consider:
- Who benefits and who is harmed?
- Are the benefits and harms distributed equitably?
- Were the people affected involved in the design decisions?
- What data is collected, and how is it used and protected?
- What are the long-term societal implications?
- Can the harmful effects be mitigated?
Key Terms for Big Idea 5
| Term | Definition |
|---|---|
| Computing innovation | A program, computing system, or computing technology with practical applications |
| Digital divide | The gap between those with and without access to computing technology |
| Digital footprint | The trail of data a person creates through digital technology use |
| Crowdsourcing | Obtaining input or services from a large group via the Internet |
| Citizen science | Public participation in scientific research |
| Copyright | Legal protection for original creative works |
| Creative Commons | A flexible copyright licensing system |
| Open source | Software with publicly available source code |
| Fair use | Limited use of copyrighted material without permission |
| Algorithmic bias | Systematic errors in AI/algorithmic outputs that create unfair outcomes |
Practice sets
5Big Idea 1 Practice: Creative Development
1. Which of the following best describes a computing innovation?
A) A physical device that uses electricity
B) A program, computing system, or technology with practical applications
C) A mathematical formula used in engineering
D) A type of computer hardware component
E) A programming language
Answer: B. A computing innovation encompasses programs, systems, and technologies that have practical applications and effects.
2. A programmer is developing an app to help students track assignments. Which of the following is the most appropriate first step?
A) Writing the code
B) Testing the program
C) Defining the problem and identifying requirements
D) Creating documentation
E) Submitting the app to an app store
Answer: C. Before any code is written, the problem should be clearly defined and requirements identified.
3. Which of the following is an example of procedural abstraction?
A) Using a variable to store a value
B) Calling a sorting procedure without knowing its implementation
C) Creating a flowchart of a program
D) Writing comments in code
E) Naming a variable descriptively
Answer: B. Procedural abstraction is using a procedure without needing to understand how it is implemented.
4. Which type of error occurs when a program produces incorrect results but does not crash?
A) Syntax error
B) Runtime error
C) Logic error
D) Compilation error
E) Hardware error
Answer: C. Logic errors cause incorrect results without crashing. The program runs, but the output is wrong.
5. A programmer writes code that is missing a closing parenthesis. This is an example of a(n):
A) Logic error
B) Runtime error
C) Syntax error
D) Abstraction error
E) Design error
Answer: C. Syntax errors are grammatical errors in the code that prevent it from running.
6. Which of the following is a benefit of using version control when developing software collaboratively?
A) It automatically fixes bugs
B) It prevents all runtime errors
C) It tracks changes and allows multiple developers to work simultaneously
D) It writes documentation automatically
E) It compiles the code automatically
Answer: C. Version control tracks changes, allows collaboration through branches, and prevents overwriting.
7. Which of the following debugging strategies involves deliberately running a program with known inputs to verify the output is correct?
A) Code review
B) Pair programming
C) Testing
D) Version control
E) Modular design
Answer: C. Testing involves running a program with various inputs (including known, boundary, and invalid inputs) to verify correctness.
8. A program is designed with separate modules for user input, data processing, and output display. This is an example of:
A) Debugging
B) Modularity
C) Encryption
D) Compression
E) Serialization
Answer: B. Modularity is dividing a program into separate, self-contained modules, each handling a specific task.
9. Which of the following is NOT required in the AP CSP Create Performance Task?
A) A procedure with at least one parameter
B) An iteration (loop)
C) A selection (IF statement)
D) A sorting algorithm
E) A list (collection)
Answer: D. The Create Task requires a procedure with a parameter, selection, iteration, a list, and a sequence. A sorting algorithm is not required.
10. Which of the following best describes top-down design?
A) Starting with the smallest components and building up
B) Starting with the overall problem and breaking it into smaller sub-problems
C) Writing all code in a single long procedure
D) Testing each line of code individually
E) Designing the user interface first
Answer: B. Top-down design starts with the overall problem and decomposes it into smaller, manageable sub-problems.
Free-Response Practice
FRQ 1: Explain the difference between a syntax error and a logic error. Provide an example of each.
Sample Response:
A syntax error is a grammatical error in the code that prevents the program from running at all. The compiler or interpreter detects syntax errors before the program executes. For example, writing IF (x > 5 without the closing parenthesis is a syntax error.
A logic error is an error in the program's reasoning that causes it to produce incorrect results even though the program runs without crashing. For example, if a program is supposed to calculate the average of test scores but uses addition instead of division (sum / count), it would produce an incorrect average. The program runs, but the output is wrong, making this a logic error.
FRQ 2: Explain how pair programming can improve the quality of a program. Describe the roles of the driver and the navigator.
Sample Response:
Pair programming improves program quality through real-time code review and collaborative problem-solving. Two developers work together at one computer, each playing a specific role.
The driver writes the code, focusing on the immediate task of implementing the solution. The navigator reviews each line as it is written, thinks strategically about the overall direction, identifies potential issues, considers alternative approaches, and watches for errors. The partners switch roles frequently, so both developers engage with both the details and the big picture.
This approach reduces bugs (two sets of eyes catch more errors than one), promotes knowledge sharing (both developers understand all parts of the code), and can improve productivity by preventing developers from getting stuck on difficult problems independently.
Big Idea 2 Practice: Data
1. What is the decimal value of the binary number 1101?
A) 11
B) 12
C) 13
D) 14
E) 15
Answer: C. 1101 = 8 + 4 + 0 + 1 = 13.
2. What is the hexadecimal equivalent of the binary number 10101111?
A) AF
B) B7
C) BE
D) A7
E) BF
Answer: A. 1010 = A, 1111 = F. So 10101111 = AF in hexadecimal.
3. A student compresses a text file and the original file can be perfectly reconstructed from the compressed version. This is an example of:
A) Lossy compression
B) Lossless compression
C) Analog compression
D) Encryption
E) Encryption compression
Answer: B. Lossless compression allows perfect reconstruction of the original data. This is essential for text files.
4. Which of the following is TRUE about lossy compression?
A) The original file can be perfectly reconstructed
B) Some data is permanently removed
C) It is primarily used for text files and executable programs
D) It always reduces file size by exactly 50%
E) It cannot be used on images
Answer: B. Lossy compression permanently removes some data. It is used for images (JPEG), audio (MP3), and video where some quality loss is acceptable.
5. How many bits are in a byte?
A) 2 B) 4 C) 8 D) 16
E) 32
Answer: C. A byte consists of 8 bits.
6. Which of the following encoding schemes can represent characters from virtually every writing system in the world?
A) ASCII
B) Binary
C) Unicode
D) hexadecimal
E) BCD
Answer: C. Unicode uses up to 32 bits and can represent over 140,000 characters from virtually every writing system.
7. An image with dimensions 800 × 600 pixels using 24-bit color depth (3 bytes per pixel) requires approximately how much storage?
A) 480 bytes
B) 1,400 bytes
C) 480 KB
D) 1.44 MB
E) 4.8 MB
Answer: D. 800 × 600 × 3 bytes = 1,440,000 bytes ≈ 1.44 MB.
8. Which of the following best describes metadata?
A) The actual content of a photograph
B) Data about data, such as the date a photo was taken or the GPS location
C) The file format of a document
D) The encryption key used to secure a file
E) The compression algorithm used
Answer: B. Metadata is data that describes other data — when a file was created, who created it, file size, GPS coordinates of a photo, etc.
9. A student converts the decimal number 25 to binary. What is the correct result?
A) 10011
B) 11001
C) 11010
D) 10101
E) 11100
Answer: B. 25 = 16 + 8 + 0 + 0 + 1 = 11001 in binary.
10. A large data set of loan applications is used to train an AI system that approves or denies loans. The data set contains historical decisions that reflect past discrimination against certain neighborhoods. This is an example of:
A) Lossy compression
B) Data bias
C) Encryption
D) The digital divide
E) Open source development
Answer: B. When a training data set reflects existing biases, the resulting AI system will perpetuate and potentially amplify those biases.
Free-Response Practice
FRQ 1: Explain the difference between lossy and lossless compression. Provide one example of when each would be appropriate.
Sample Response:
Lossless compression reduces file size without losing any data — the original file can be perfectly reconstructed. It is appropriate for data where any loss of information is unacceptable, such as text documents, executable programs, and medical records.
Lossy compression reduces file size by permanently removing some data — the original cannot be perfectly reconstructed. It is appropriate when some quality loss is acceptable in exchange for much smaller file sizes, such as streaming music (MP3), viewing photos online (JPEG), or watching video (streaming services).
FRQ 2: Explain why a binary system is used to represent data in computers rather than a decimal system. Describe how a color image is represented in binary.
Sample Response:
Computers use binary because they are built from transistors that have two states: on (1) and off (0). Binary is the natural representation for these electronic switches. While it would theoretically be possible to build a computer using ten voltage levels for decimal, binary is much more reliable because distinguishing between two states is easier than distinguishing between ten.
A color image is represented in binary using pixels. Each pixel is assigned RGB (red, green, blue) values, where each color component is stored as a binary number (typically 8 bits, ranging from 0-255). A 24-bit color image uses 3 bytes per pixel (8 bits × 3 colors). The entire image is a grid of pixels, each represented by binary values specifying its color.
Big Idea 3 Practice: Algorithms and Programming
1. What is displayed after running the following code? (Note: AP CSP list indices start at 1)
list ← [10, 20, 30, 40, 50]
DISPLAY(list[3])
A) 10
B) 20
C) 30
D) 40
E) 50
Answer: C. In AP CSP, list indices start at 1. list[3] is the third element, which is 30.
2. Which of the following expressions evaluates to TRUE?
A) (3 > 5) AND (7 < 10)
B) (3 > 5) OR (7 < 10)
C) NOT (3 > 5) AND NOT (7 < 10)
D) (3 = 5) AND (7 = 10)
E) NOT (7 < 10)
Answer: B. (3 > 5) is FALSE, (7 < 10) is TRUE. FALSE OR TRUE = TRUE.
3. What value is displayed by the following code?
x ← 1
REPEAT 4 TIMES
{
x ← x * 2
}
DISPLAY(x)
A) 4 B) 8 C) 16
D) 32
E) 2
Answer: C. After 1st iteration: x=2. After 2nd: x=4. After 3rd: x=8. After 4th: x=16.
4. A procedure is defined as follows:
PROCEDURE mystery(n)
{
IF (n < 0)
{
RETURN (n * -1)
}
ELSE
{
RETURN (n)
}
}
What is returned by mystery(-7)? A) -7
B) 7 C) 0 D) TRUE
E) An error occurs
Answer: B. Since -7 < 0 is TRUE, the procedure returns -7 * -1 = 7. This procedure returns the absolute value.
5. Which searching algorithm requires the list to be sorted? A) Linear search
B) Binary search
C) Both linear and binary search
D) Neither linear nor binary search
E) Only hash-based search
Answer: B. Binary search requires the list to be sorted because it compares the target with the middle element and eliminates half the list based on the comparison.
6. Which of the following is an advantage of using a binary search over a linear search on a sorted list of 1,000,000 elements? A) Binary search examines fewer elements in the worst case
B) Binary search works on unsorted lists
C) Binary search always finds the element on the first try
D) Binary search uses less memory
E) Linear search does not work on sorted lists
Answer: A. Binary search examines at most log₂(1,000,000) ≈ 20 elements. Linear search may examine all 1,000,000 elements.
7. What is displayed by the following code?
sum ← 0
FOR EACH number IN [3, 5, 2, 8]
{
IF (number MOD 2 = 0)
{
sum ← sum + number
}
}
DISPLAY(sum)
A) 3 B) 5 C) 10
D) 18
E) 0
Answer: C. The code adds only even numbers (number MOD 2 = 0). Even numbers in the list: 2, 8. Sum = 2 + 8 = 10.
8. A programmer writes a procedure that takes a list of numbers and returns the index of the largest number. What is the minimum number of elements that must be examined to guarantee the correct result? A) 1 B) Half the elements
C) All elements
D) log₂(n) elements
E) It depends on the list
Answer: C. To guarantee finding the maximum, every element must be examined. If even one element is skipped, it could be the largest.
9. Which of the following best describes the running time of binary search? A) O(1)
B) O(n)
C) O(n²)
D) O(2ⁿ)
E) O(log n)
Answer: E. Binary search eliminates half the remaining elements with each comparison, giving logarithmic running time.
10. A simulation of traffic flow is used to predict congestion. Which of the following is a limitation of simulations? A) Simulations are always slower than studying the real system
B) Simulations may not account for rare or unexpected events
C) Simulations cannot be run on computers
D) Simulations always produce perfectly accurate results
E) Simulations can only model physical systems
Answer: B. Simulations are based on models, and models may not account for all real-world variables, especially rare or unexpected events.
Free-Response Practice
FRQ 1: Consider the following procedure:
PROCEDURE findMax(list)
{
maxVal ← list[1]
FOR EACH item IN list
{
IF (item > maxVal)
{
maxVal ← item
}
}
RETURN maxVal
}
Trace through the procedure with the input list [5, 12, 3, 18, 7]. Show the value of maxVal after each comparison.
Sample Response:
Initial: maxVal ← 5 Compare 12 > 5? YES → maxVal ← 12 Compare 3 > 12? NO → maxVal stays 12 Compare 18 > 12? YES → maxVal ← 18 Compare 7 > 18? NO → maxVal stays 18
The procedure returns 18.
FRQ 2: Explain why binary search is more efficient than linear search for large sorted lists. Explain a limitation of binary search compared to linear search.
Sample Response:
Binary search is more efficient because each comparison eliminates half of the remaining elements, giving a running time of O(log n). For a list of 1 million elements, binary search requires at most approximately 20 comparisons, while linear search may require up to 1 million comparisons.
The limitation of binary search is that it only works on sorted lists. If the list is unsorted, binary search cannot be used, and linear search must be used instead. Additionally, binary search requires random access to list elements (being able to jump directly to any position), which is not possible with some data structures.
Big Idea 4 Practice: Computing Systems and Networks
1. Which of the following best describes how data is transmitted over the Internet?
A) Data is sent as a single continuous stream
B) Data is broken into packets that travel independently
C) Data is transmitted through a single dedicated circuit
D) Data is broadcast to all connected devices simultaneously
E) Data is converted to analog signals before transmission
Answer: B. The Internet uses packet switching — data is divided into packets that may travel different routes.
2. The Internet is considered fault-tolerant because:
A) It has unlimited bandwidth
B) It uses encryption on all connections
C) Packets can be rerouted if a path fails
D) It never experiences outages
E) All websites have backup servers
Answer: C. The Internet's packet-switched, decentralized design allows data to be rerouted around failed components.
3. Which protocol translates domain names (like www.google.com) into IP addresses?
A) HTTP
B) HTTPS
C) TCP
D) DNS
E) FTP
Answer: D. The Domain Name System (DNS) translates human-readable domain names into numerical IP addresses.
4. Which of the following is an example of symmetric encryption?
A) Using a public key to encrypt and a private key to decrypt
B) Using the same secret key for both encryption and decryption
C) Not encrypting data at all
D) Using a hash function
E) Using digital signatures
Answer: B. Symmetric encryption uses the same key for both encryption and decryption.
5. A social engineering attack that tricks users into revealing their passwords by sending fraudulent emails that appear to be from a legitimate source is called:
A) A DDoS attack
B) Phishing
C) A virus
D) Ransomware
E) A man-in-the-middle attack
Answer: B. Phishing uses fraudulent communications to trick users into revealing sensitive information.
6. Which of the following is the primary purpose of a firewall?
A) To speed up Internet connections
B) To convert analog signals to digital signals
C) To monitor and control network traffic based on security rules
D) To compress data for faster transmission
E) To translate domain names to IP addresses
Answer: C. Firewalls monitor and control network traffic based on security rules, blocking unauthorized access.
7. Which component of a computer is considered volatile, meaning it loses its contents when power is turned off?
A) Hard drive
B) Solid state drive
C) RAM
D) ROM
E) USB drive
Answer: C. RAM (Random Access Memory) is volatile — it loses data when power is off. Storage devices are non-volatile.
8. In public key encryption, which key is used to decrypt a message that was encrypted with the recipient's public key?
A) The sender's public key
B) The sender's private key
C) The recipient's public key
D) The recipient's private key
E) A shared symmetric key
Answer: D. Messages encrypted with a public key can only be decrypted with the corresponding private key.
9. Which of the following best describes redundancy in computing systems?
A) Having multiple copies of data or backup components
B) Removing unnecessary data
C) Compressing files
D) Encrypting sensitive data
E) Using open source software
Answer: A. Redundancy involves including extra components or backup data that can take over if the primary system fails.
10. A DDoS attack is best described as:
A) Stealing data from a computer
B) Encrypting files and demanding payment
C) Flooding a server with traffic from many computers to overwhelm it
D) Intercepting communications between two parties
E) Spreading malware through email attachments
Answer: C. A Distributed Denial of Service (DDoS) attack floods a target with traffic from many compromised computers (a botnet).
Free-Response Practice
FRQ 1: Explain how packet switching makes the Internet fault-tolerant. Describe what happens when a router along a packet's path fails.
Sample Response:
Packet switching makes the Internet fault-tolerant because data is broken into independent packets that can each take different routes to the destination. If a router along one path fails, the packets that would have traveled through that router can be rerouted through alternative paths. Other routers detect that the failed route is unavailable and update their routing tables to send subsequent packets along working paths. This means no single point of failure can prevent data from reaching its destination — the system adapts dynamically to failures.
FRQ 2: Compare symmetric and asymmetric (public key) encryption. Explain one advantage of each.
Sample Response:
Symmetric encryption uses the same key for both encryption and decryption. Its main advantage is speed — it is computationally much faster than asymmetric encryption, making it suitable for encrypting large amounts of data.
Asymmetric (public key) encryption uses a pair of mathematically related keys — a public key that can be shared openly and a private key that is kept secret. Its main advantage is that it solves the key distribution problem. Anyone can encrypt a message using the recipient's public key, but only the recipient with the private key can decrypt it. This eliminates the need to securely share a secret key in advance.
In practice, systems like HTTPS combine both approaches: asymmetric encryption is used to securely exchange a symmetric key, and then symmetric encryption is used for the actual data transmission, getting the benefits of both.
Big Idea 5 Practice: Impact of Computing
1. A social media company collects data about users' browsing habits across the Internet without their knowledge. This is most directly related to which concern?
A) The digital divide
B) Data privacy
C) Open source licensing
D) Citizen science
E) Bandwidth limitations
Answer: B. Collecting user data without knowledge raises data privacy concerns.
2. Which of the following best describes the digital divide?
A) The difference between binary and hexadecimal number systems
B) The gap between those who have access to computing technology and those who do not
C) The separation between hardware and software
D) The difference between public and private networks
E) The gap between encryption and decryption
Answer: B. The digital divide is the gap in access to technology between different demographics and regions.
3. A student posts inappropriate content on social media. Years later, when applying for jobs, the employer finds the old posts. This illustrates which characteristic of digital data?
A) Digital data is always encrypted
B) Digital data is persistent and searchable
C) Digital data is always compressed
D) Digital data is open source
E) Digital data automatically deletes after one year
Answer: B. Digital data is persistent (hard to delete completely) and searchable (easy to find), making digital footprints long-lasting.
4. Which of the following is an example of crowdsourcing?
A) A company develops software in-house
B) Wikipedia relies on volunteers to write and edit articles
C) A student completes homework independently
D) A researcher conducts a controlled laboratory experiment
E) A government classifies documents as top secret
Answer: B. Wikipedia is a classic example of crowdsourcing — obtaining content from a large group of volunteers.
5. A software developer releases a program's source code publicly, allowing anyone to view, modify, and distribute it. This is an example of:
A) Proprietary software
B) Copyright infringement
C) Open source software
D) Ransomware
E) A patent
Answer: C. Open source software makes source code publicly available for viewing, modification, and distribution.
6. Which of the following best describes algorithmic bias?
A) A programmer's personal opinions affecting code design
B) Systematic errors in algorithmic outputs that create unfair outcomes, often due to biased training data
C) Algorithms that always produce random results
D) The speed difference between algorithms
E) Errors caused by syntax mistakes
Answer: B. Algorithmic bias refers to systematic unfairness in algorithmic outputs, often stemming from biased training data or flawed design decisions.
7. Creative Commons licenses allow creators to:
A) Copyright any work permanently
B) Patent their software inventions
C) Specify how others can use their work without requiring individual permission
D) Encrypt their content
E) Sell their work to the highest bidder
Answer: C. Creative Commons licenses let creators specify the terms under which others can use their work, promoting sharing while retaining some rights.
8. Which of the following is an unintended consequence of social media platforms?
A) People can communicate across long distances
B) Misinformation spreads rapidly, potentially influencing elections
C) Businesses can advertise to target audiences
D) People can share photos with friends
E) News organizations can reach wider audiences
Answer: B. The rapid spread of misinformation was not the intended purpose of social media platforms and is an unintended harmful consequence.
9. A facial recognition system trained primarily on light-skinned faces performs poorly on dark-skinned faces. This is best explained by:
A) Lossy compression
B) Data bias in the training data set
C) Public key encryption
D) Packet switching
E) The digital divide
Answer: B. The system's poor performance on dark-skinned faces reflects bias in the training data, which underrepresented diverse populations.
10. Which of the following is NOT a type of intellectual property protection?
A) Copyright
B) Patent
C) Trademark
D) Firewall
E) Trade secret
Answer: D. A firewall is a cybersecurity tool, not a form of intellectual property protection. Copyright, patent, trademark, and trade secret are all forms of IP protection.
Free-Response Practice
FRQ 1: A city implements a new AI-powered surveillance system that uses facial recognition to identify criminal suspects in public spaces. Identify one beneficial effect and one harmful effect of this computing innovation.
Sample Response:
Beneficial effect: The surveillance system could help law enforcement identify and apprehend criminal suspects more quickly, potentially reducing crime rates and improving public safety. The system can process thousands of faces in real-time, which would be impossible for human officers to do manually.
Harmful effect: The facial recognition system may misidentify innocent people, particularly people of color, due to biased training data. This could lead to false arrests, wrongful detention, and erosion of trust between communities and law enforcement. Additionally, the system enables mass surveillance, raising serious privacy concerns about the tracking of law-abiding citizens in public spaces.
FRQ 2: Explain the concept of a digital footprint. Describe one way a person can manage their digital footprint.
Sample Response:
A digital footprint is the trail of data a person creates through their use of digital technology. It includes both passive data (browsing history, location data collected without explicit action) and active data (social media posts, emails, uploaded photos). Digital footprints are persistent and searchable, meaning information shared online can be very difficult to remove and can be found by others.
One way to manage a digital footprint is to regularly review and adjust privacy settings on social media accounts. Users should limit who can see their posts, disable location sharing, and review what apps have access to their data. Additionally, thinking critically before posting anything — assuming that anything shared online could be seen by future employers, college admissions officers, or anyone else — is a foundational strategy for managing one's digital footprint.
Summary & cheat sheets
1AP Computer Science Principles — Summary Sheet
- Computing innovation: Program, system, or technology with practical applications and effects
- Program design: Modularity (separate modules), abstraction (hiding complexity), top-down design (break into sub-problems)
- Collaboration: Version control (Git/GitHub — repos, commits, branches, merges), pair programming (driver + navigator), code review
- Errors: Syntax (grammatical, prevents running), Runtime (crashes during execution), Logic (wrong results, no crash)
- Testing: Test with typical inputs, boundary values, invalid inputs, extreme values
- Documentation: Comments, API docs, README files
- Create Task requires: Sequence, Selection (IF), Iteration (loop), List, Procedure with parameter
Big Idea 2: Data (17–22%)
- Binary: Base-2 (0, 1). Positions = powers of 2 (128, 64, 32, 16, 8, 4, 2, 1)
- Hexadecimal: Base-16 (0-9, A-F). Each hex digit = 4 bits. Useful compact binary representation
- Units: Bit → Byte (8 bits) → KB (~10³ bytes) → MB (~10⁶) → GB (~10⁹) → TB (~10¹²)
- Data representation: Integers (binary), Text (ASCII=7 bits, Unicode=up to 32 bits), Images (pixels with RGB, 8 bits each), Audio (sampling rate + bits per sample)
- Lossless compression: Original perfectly reconstructable. Used for text, executables, medical images. Methods: RLE, Huffman coding
- Lossy compression: Original NOT recoverable. Used for images (JPEG), audio (MP3), video. Permanently removes data
- Data bias: Biased training data → biased AI outputs. Reflects societal inequalities
- Metadata: Data about data (timestamp, location, file size, camera settings)
- Privacy: PII (Personally Identifiable Information), data collection, consent
- Key conversions: 1010₂ = 10₁₀ = A₁₆; 1111₂ = 15₁₀ = F₁₆
Big Idea 3: Algorithms and Programming (30–35%) — HIGHEST WEIGHT
- Data types: Integer, String (text), Boolean (TRUE/FALSE), Float (decimal)
- Operators: Arithmetic (+, -, *, /, MOD), Comparison (=, ≠, >, <, ≥, ≤), Boolean (AND, OR, NOT)
- Control flow:
- Sequencing: statements execute in order
- Selection: IF / IF-ELSE — choose path based on condition
- Iteration: REPEAT n TIMES, REPEAT UNTIL (always runs ≥1 time), FOR EACH item IN list
- Lists: 1-indexed in AP CSP. Operations: ACCESS (list[i]), ASSIGN (list[i] ← value), INSERT, APPEND, REMOVE, LENGTH
- Procedures: Named, reusable code blocks. Parameters receive values; arguments pass values. RETURN sends a value back
- Procedural abstraction: Use a procedure without knowing its implementation
- Libraries/APIs: Pre-written code for common tasks
- Linear search: Check each element. Works on sorted/unsorted. O(n)
- Binary search: Divide sorted list in half. O(log n). ONLY works on sorted lists
- Running times (slowest to fastest): O(2ⁿ) exponential > O(n²) polynomial > O(n) linear > O(log n) logarithmic > O(1) constant
- Undecidable problems: No algorithm always gives correct answer (e.g., Halting Problem)
- Simulations: Model real-world processes. Limited by model accuracy. Cannot predict rare/unexpected events
- String operations: Concatenation (+), length, substring extraction
Big Idea 4: Computing Systems and Networks (11–15%)
- Hardware: CPU (executes instructions), RAM (volatile, short-term), Storage (non-volatile, long-term: HDD, SSD)
- Internet: Global network of networks. Decentralized, no single control point
- Packet switching: Data broken into packets, each routed independently. Enables fault tolerance
- Protocols:
- TCP/IP: Foundation of Internet. IP = addressing/routing, TCP = reliable delivery
- HTTP/HTTPS: Web pages. HTTPS adds encryption (TLS/SSL)
- DNS: Domain names → IP addresses
- IP addresses: IPv4 (32-bit, ~4.3B addresses), IPv6 (128-bit, ~3.4×10³⁸ addresses)
- Routers: Forward packets between networks using routing tables
- Fault tolerance: System continues despite failures. Redundancy = backup components
- Cybersecurity threats: Malware (virus, worm, trojan, ransomware, spyware), Phishing, DDoS, Man-in-the-middle
- Encryption: Symmetric (same key for encrypt/decrypt, fast), Asymmetric/Public key (public + private keys, solves key distribution)
- Security measures: Firewalls, VPNs, 2FA, Antivirus, Software updates, Strong passwords
Big Idea 5: Impact of Computing (21–26%)
- Effects of innovations: Always identify BOTH beneficial AND harmful effects
- Unintended consequences: Negative outcomes not anticipated by creators
- Digital divide: Gap in technology access (physical access, digital literacy, productive use)
- Digital footprint: Trail of data created online. Passive (collected without action) + Active (intentionally shared). Persistent + Searchable
- Managing digital footprint: Be mindful, review privacy settings, think before posting
- Intellectual property: Copyright (automatic, lifetime+70yr), Patent (inventions, 20yr), Trademark (brands), Trade secret
- Creative Commons: Flexible licensing — specify how others can use your work
- Open source: Source code publicly available (Linux, Firefox, Python)
- Fair use: Limited use of copyrighted material for criticism, education, commentary
- Crowdsourcing: Obtaining input from large groups via Internet (Wikipedia, Waze, Kickstarter)
- Citizen science: Public participation in research (eBird, Zooniverse)
- Algorithmic bias: Biased outputs due to biased data or design. Systematic unfairness
Must-Know Conversions Quick Reference
| Binary | Hex | Decimal |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | A | 10 |
| 1011 | B | 11 |
| 1100 | C | 12 |
| 1101 | D | 13 |
| 1110 | E | 14 |
| 1111 | F | 15 |
Boolean Logic Quick Reference
| A | B | A AND B | A OR B | NOT A |
|---|---|---|---|---|
| T | T | T | T | F |
| T | F | F | T | F |
| F | T | F | T | T |
| F | F | F | F | T |
Key Reminder: AP CSP lists are 1-indexed (start at 1, not 0)
Audio script
1AP Computer Science Principles — Audio Review Script
Welcome to your AP Computer Science Principles audio review. This script covers all five Big Ideas tested on the exam. The exam consists of 70 multiple-choice questions worth 70 percent of your score, and the Create Performance Task worth 30 percent. On exam day, you will only complete the multiple-choice section. Multiple-select questions require you to choose exactly two answers — don't forget that. Let's begin.
Big Idea 1: Creative Development (3 minutes)
Creative development covers how programs are designed, developed, and tested.
A computing innovation is any program, system, or technology with practical applications. The development process starts with defining the problem, exploring solutions, and then designing and implementing the program.
Key design principles include modularity, which means dividing a program into separate, self-contained modules. And abstraction, which means hiding complex details behind a simpler interface.
Collaboration is essential in modern software development. Version control systems like Git track changes to code over time, allowing multiple developers to work simultaneously. Pair programming has two developers at one computer — the driver writes code while the navigator reviews and thinks strategically.
There are three types of errors. Syntax errors are grammatical mistakes that prevent the code from running at all. Runtime errors cause the program to crash while executing, like dividing by zero. Logic errors produce wrong results without crashing — these are the hardest to find.
Testing should include typical inputs, boundary values like zero or maximum values, and invalid inputs to ensure the program handles errors gracefully.
Big Idea 2: Data (5 minutes)
All data in a computer is represented as binary — ones and zeros — because transistors have two states: on and off.
In binary, each position represents a power of two: 128, 64, 32, 16, 8, 4, 2, and 1. To convert binary to decimal, add the values of positions containing a one. For example, binary 1011 equals 8 plus 0 plus 2 plus 1, which is 11 in decimal.
Hexadecimal is base-16, using digits 0 through 9 and letters A through F. Each hexadecimal digit equals exactly four bits, making hex a compact way to represent binary data.
Data storage units: a bit is one binary digit, a byte is 8 bits, a kilobyte is about a thousand bytes, a megabyte about a million, and so on.
Different types of data are represented differently in binary. Text uses encoding schemes — ASCII uses 7 bits for 128 characters, while Unicode can represent over 140,000 characters. Images are composed of pixels, each with red, green, and blue values of 0 to 255, each requiring 8 bits. Audio is digitized by sampling sound waves at regular intervals.
Data compression comes in two types. Lossless compression allows perfect reconstruction of the original data — used for text and executables. Lossy compression permanently removes data — used for images like JPEG, audio like MP3, and video. Know the difference: can the original be perfectly recovered? Lossless yes, lossy no.
Large data sets enable pattern discovery and prediction but raise concerns about data bias. If training data reflects societal biases, the resulting algorithms will perpetuate those biases.
Big Idea 3: Algorithms and Programming (8 minutes)
This is the most heavily weighted Big Idea at 30 to 35 percent of the exam.
Variables store data values. Data types include integers, strings for text, Booleans which are true or false, and floating-point numbers with decimals.
Operators include arithmetic operators like plus, minus, multiply, divide, and MOD which gives the remainder after division. Comparison operators like greater than, less than, and equal to, which evaluate to true or false. And Boolean operators: AND, which is true only when both operands are true; OR, which is true when at least one is true; and NOT, which reverses the truth value.
Control flow has three fundamental structures. Sequencing executes statements in order. Selection uses IF and IF-ELSE to choose between paths based on a condition. Iteration uses loops to repeat code. In AP pseudocode, REPEAT n TIMES loops exactly n times. REPEAT UNTIL with a condition loops until the condition is true — and it always runs at least once. FOR EACH iterates through every element in a list.
Important: AP CSP lists are 1-indexed, starting at position 1, not 0 like most programming languages.
Procedures are named, reusable code blocks. Parameters are variables in the procedure that receive values from arguments when the procedure is called. A procedure can return a value using the RETURN statement. Procedural abstraction means you can use a procedure without knowing how it works inside.
Searching algorithms: linear search checks each element one by one and works on any list. Its running time is O of n, linear. Binary search works only on sorted lists by repeatedly dividing the search range in half. Its running time is O of log n, logarithmic — much faster for large lists.
Running time comparison from fastest to slowest: O of 1 constant, O of log n logarithmic, O of n linear, O of n squared polynomial, and O of 2 to the n exponential. Exponential algorithms become impractical for large inputs.
The Halting Problem — determining whether any given program will eventually stop — is undecidable. No algorithm can solve it for all possible programs.
Big Idea 4: Computing Systems and Networks (4 minutes)
Computer hardware includes the CPU which executes instructions, RAM which is volatile short-term memory, and storage devices like hard drives and SSDs which are non-volatile.
The Internet is a global, decentralized network of networks. Data is transmitted using packet switching — data is broken into small packets that travel independently to the destination. This makes the Internet fault-tolerant because packets can be rerouted if a path fails.
Key protocols: TCP/IP is the foundation. IP handles addressing and routing, TCP ensures reliable delivery. HTTP and HTTPS are used for web pages — HTTPS adds encryption. DNS translates domain names into IP addresses.
IP addresses identify devices on the Internet. IPv4 uses 32 bits and is running out of addresses. IPv6 uses 128 bits and provides an enormous number of addresses.
Cybersecurity threats include malware like viruses, worms, trojans, and ransomware. Phishing tricks users into revealing sensitive information. DDoS attacks flood servers with traffic.
Encryption comes in two forms. Symmetric encryption uses the same key for both encryption and decryption — it's fast. Asymmetric or public key encryption uses a public key and a private key — the public key encrypts, only the private key can decrypt. This solves the key distribution problem.
Security measures include firewalls, VPNs, two-factor authentication, and keeping software updated.
Big Idea 5: Impact of Computing (4 minutes)
Every computing innovation has both beneficial and harmful effects. The exam frequently asks you to identify and explain both.
The digital divide is the gap between those who have access to computing technology and those who don't — including gaps in physical access, digital skills, and productive usage.
A digital footprint is the trail of data you create online. It includes passive data collected without your action, like browsing history, and active data you deliberately share, like social media posts. Digital data is persistent — very hard to delete — and searchable.
Intellectual property includes copyright for creative works, patents for inventions, trademarks for brands, and trade secrets for confidential business information. Creative Commons provides flexible licensing. Open source software makes source code publicly available. Fair use allows limited use of copyrighted material for education, criticism, and commentary.
Crowdsourcing obtains input from large groups via the Internet. Wikipedia and Waze are examples. Citizen science involves public participation in research.
Algorithmic bias occurs when biased data or flawed design causes systematic unfairness in algorithmic outputs.
Final Tips (1 minute)
Remember: AP CSP lists start at index 1. Multiple-select questions need exactly two answers. REPEAT UNTIL always runs at least once. Binary search only works on sorted lists. Lossless means perfect reconstruction; lossy means some data is permanently lost. Every computing innovation has both beneficial and harmful effects.
Review this script multiple times. Focus especially on Big Idea 3 since it's worth the most. Practice tracing through pseudocode by hand. And good luck on your AP Computer Science Principles exam.