Home ›
AP Computer Science Principles ›
Unit 2 ›
Visual Review
AP Computer Science Principles Unit 2 Visual Review
A topic-by-topic visual walkthrough of Big Idea 2: Data — binary numbers, data compression, extracting information from data, and using programs with data.
← Back to Unit 2 hub
TOPIC 2.1
Binary Numbers
1 0 1 1 0 1 0 → binary to decimal
64 32 16 8 4 2 1
1 0 1 1 0 1 0
= 64+16+8+2 = 90
Bits & bytes
A BIT is a single 0 or 1.
A BYTE is 8 bits (256 combinations).
Computers store ALL data — numbers,
text, images, sound — as bits.
Analog vs. digital
ANALOG data is continuous (a smooth
wave). DIGITAL data uses discrete bits.
Analog is SAMPLED into digital — with
enough samples, it's a close approximation.
Add the place values where a bit is 1 to convert binary to decimal.
The Review Hub · AP Computer Science Principles · Big Idea 2
TOPIC 2.2
Data Compression
Lossless
Reduces size with NO data lost —
the original is fully recoverable.
Works by removing REDUNDANCY
(e.g. "AAAA" → "4A").
Examples: PNG, ZIP, GIF. Use for text/data.
Lossy
Reduces size MORE by permanently
discarding some data.
The original CANNOT be fully restored,
but the result is "good enough."
Examples: JPEG, MP3. Use for photos/audio.
The trade-off
Lossy gives smaller files but lower quality; lossless keeps perfect quality but larger files. Choose by need — never use lossy where every bit matters.
Lossless is fully reversible; lossy discards data for smaller files.
The Review Hub · AP Computer Science Principles · Big Idea 2
TOPIC 2.3
Extracting Information from Data
Data becomes information when we find patterns in it
Large data sets are processed to reveal trends, correlations, and insights that no single record shows.
Metadata = data about data (e.g. a photo's date, size, and location).
Finding patterns
• CORRELATION: two things vary together.
• TREND: a direction over time.
• OUTLIER: a value far from the rest.
Correlation does NOT prove causation.
Visualizations & cleaning
Charts and graphs make patterns visible
and help communicate findings.
Data often must be CLEANED first —
fixing errors, duplicates, and gaps.
Filtering narrows to just the rows you need.
Extract insight by finding patterns, trends, and correlations — but correlation ≠ causation.
The Review Hub · AP Computer Science Principles · Big Idea 2
TOPIC 2.4
Using Programs with Data
Programs process data at scale
Software can process huge data sets far
faster and more accurately than people.
Common operations: filter, sort, and
combine (join) tables of data.
Three key operations
• FILTER: keep rows meeting a condition.
• CLEAN: fix or remove bad data.
• TRANSFORM: compute new values from old.
Then summarize with counts, sums, averages.
Scalability & limits
Bigger data can reveal stronger patterns, but takes more storage and processing time. Some problems
grow too large to process in a reasonable time — a limit on what data alone can answer.
Programs filter, clean, and transform data at a scale humans can't match.
The Review Hub · AP Computer Science Principles · Big Idea 2
▤ Show all slides
How to use the visual review
Spend 30 seconds per slide before clicking next. Look at the diagram, then ask yourself: "Could I explain this idea, or convert this binary number, from memory?"
Use the fullscreen button () on desktop for the best experience. Use arrow keys to navigate. Tap "Show all slides" to jump around.
This is great for review the night before the exam — fast, visual, and covers every idea you need to recognize in Unit 2.