SAT / PSAT
SAT / PSAT Prep
History & Social Science
AP World History AP US History AP European History AP Human Geography AP US Government & Politics AP Psychology AP Macroeconomics AP Microeconomics
English
AP English Language & Composition AP English Literature & Composition
Math & Computer Science
AP Calculus AB/BC AP Precalculus AP Statistics AP Computer Science A AP Computer Science Principles
Sciences
AP Biology AP Chemistry AP Environmental Science AP Physics 1 AP Physics 2
World Languages & Arts
AP Spanish Language AP Art History AP Music Theory Start studying →
Unit 2 · Data Flashcards Cheat Sheet Essentials Visual Review MC Practice FRQ Practice

AP Computer Science Principles Unit 2 Cheat Sheet

A one-page visual summary of Data — every key idea, compression type, and exam trap you need, on a single screen.

← Back to Unit 2 hub

The basics

What it covers: How data is represented as bits, how it is compressed, and how programs extract information from data.

Exam weight: Big Idea 2 is about 17–22% of the AP CSP multiple-choice exam.

The big question: How is all data represented with bits, and how do we compress it and turn it into useful information?

Computational thinking practices: Computational Solution Design, Algorithms & Program Development, Abstraction, Code Analysis, Computing Innovations, and Responsible Computing.

Key topics at a glance

Bits & Bytes

A bit is a 0 or 1 — the smallest unit of data. A byte is 8 bits. All data (numbers, text, images, sound) is ultimately stored as bits.

Binary Numbers

Convert binary → decimal by adding the place values (powers of 2) where there is a 1. n bits represent 2ⁿ values. Too big for the bits → overflow.

Analog vs. Digital

Analog data is continuous; digital data is discrete. Sampling converts analog to digital — finer samples = more accurate.

Data Abstraction

Bits are an abstraction: the same sequence can represent a number, letter, color, or sound depending on how a program interprets it.

Data Compression

Lossless: no data lost, fully recoverable (ZIP, PNG). Lossy: some data permanently discarded, smaller size (JPEG, MP3).

Compression Tradeoff

Lossless keeps all quality but shrinks less; lossy shrinks more but loses fidelity. Use lossless when every detail matters.

Information & Metadata

Data = raw facts; information = insight from analyzing data. Metadata = data about data (date, size, location).

Extracting & Using Data

Find patterns by filtering, sorting, and aggregating. Correlation ≠ causation. Clean data first. Programs process large datasets at scale.

The key terms you must know

Key themes to remember

Common exam traps