← All Cheat Sheets

AP Computer Science Principles Reference Sheet 2026

Pseudocode syntax · Big Ideas vocabulary · Binary & data · Internet protocols · Cybersecurity

AP CSP Pseudocode Syntax

StatementExample
Assignmentx ← 5
Display outputDISPLAY(x)
Inputx ← INPUT()
Arithmetic+ − * / MOD
String concat"Hello" + name
Comparison= ≠ < > ≤ ≥
Boolean opsAND OR NOT
IF / ELSE IFIF (cond) { ... }
ELSE { ... }
FOR loopFOR EACH item IN list { ... }
REPEAT N timesREPEAT n TIMES { ... }
REPEAT UNTILREPEAT UNTIL (cond) { ... }
Procedure defPROCEDURE name(params) { ... }
Call procedurename(args)
Return valueRETURN (value)
List creationmyList ← [1, 2, 3]
List accessmyList[i] (1-indexed)
List insertINSERT(myList, i, val)
List appendAPPEND(myList, val)
List removeREMOVE(myList, i)
List lengthLENGTH(myList)

5 Big Ideas & Key Concepts

Each Big Idea has a color-coded badge below.

BI 1 Creative Development

Iterative design process · Collaboration · Abstraction to manage complexity · Procedural abstraction · Program documentation

BI 2 Data

Binary representation · Overflow · Lossless vs. lossy compression · Metadata · Data aggregation · Privacy implications · Machine learning from data · Correlation ≠ causation

BI 3 Algorithms & Programming

Sequencing, selection, iteration · Variables, parameters, return values · Boolean logic · Recursion · Linear vs. binary search · Algorithm efficiency (runtime) · Heuristics · Undecidable problems

BI 4 Computer Systems & Networks

Packet switching · DNS · HTTP/HTTPS · IP addresses · Fault tolerance · Open protocols · TCP/IP layers · Bandwidth vs. latency · Sequential vs. parallel computing

BI 5 Impact of Computing

Digital divide · Privacy (PII, aggregation, tracking) · Intellectual property · Creative Commons · Net neutrality · Cybersecurity threats · Bias in algorithms · Beneficial & harmful effects

Binary & Data Representation

ConceptRule / Example
Binary (base-2)Digits: 0, 1 only. 1010₂ = 10₁₀
Bit positionsRight to left: 2⁰, 2¹, 2², 2³... (1, 2, 4, 8...)
n bits → values2ⁿ distinct values (0 to 2ⁿ − 1)
8 bits = 1 byte256 possible values (0–255)
HexadecimalBase-16: 0–9 then A=10, B=11...F=15
OverflowResult exceeds max bits → wraps or error
Roundoff errorFloating-point can't represent all decimals exactly
Lossless compressOriginal fully recoverable (ZIP, PNG, run-length)
Lossy compressData permanently discarded (JPEG, MP3)
RGB color3 × 8 bits = 24-bit = 16.7 million colors
Analog → digitalSampling: higher sample rate = more accurate

Internet & Network Concepts

TermDefinition
IP addressUnique identifier for each device on a network
DNSTranslates domain names → IP addresses (Internet's phonebook)
Packet switchingData split into packets; each may take different routes
HTTPProtocol for web data transfer; plaintext
HTTPSHTTP + TLS encryption; data is encrypted in transit
BandwidthMaximum data transfer rate (bits per second)
LatencyTime delay for data to travel from source to destination
Fault toleranceSystem continues working even if components fail (redundancy)
Open protocolsPublicly documented standards; anyone can build compatible software
SequentialSteps executed one at a time
Parallel computingMultiple tasks execute simultaneously on multiple processors
Distributed computingMultiple networked computers work together on one problem

Cybersecurity & Privacy

TermDefinition
AuthenticationVerifying identity (password, 2FA, biometrics)
AuthorizationGranting permission to access a resource
EncryptionTransforming data so only authorized parties can read it
PhishingDeceptive attempts to steal credentials (fake emails/sites)
MalwareSoftware designed to damage or gain unauthorized access
RansomwareMalware that encrypts data and demands payment
DDoSDistributed Denial of Service — overwhelming a server with traffic
PIIPersonally Identifiable Information — data that identifies a person
Data aggregationCombining multiple data points to reveal sensitive information not apparent from individual pieces
MetadataData about data — e.g., who sent a message, when, from where
CookieSmall data file stored by a browser to track sessions/preferences
Digital footprintAll data about a person created by their online activity

Impact of Computing — Key Terms

TermDefinition
Digital divideUnequal access to computers and internet across populations
Net neutralityISPs must treat all internet traffic equally (no blocking/throttling)
Creative CommonsLicenses that specify conditions for use/sharing while retaining copyright
Open sourceSoftware with publicly available source code; anyone can modify/distribute
Algorithmic biasSystematic unfairness in AI/algorithm outputs due to biased training data
Filter bubbleAlgorithms show only content matching prior preferences, reducing exposure to other views
CrowdsourcingObtaining input/work from a large online group
Citizen sciencePublic volunteers contribute data to scientific research using technology
Practice Test → Score Calculator →