UnderGraduate Classes — Enroll Now APCSA,AP Physics & APCSP Classes Starting September/October Learn Python, Java & Web Design AP Cybersecurity — New Course Expert-Led · Small Batches · Hands-On Projects Contact: oggntech@gmail.com UnderGraduate Classes — Enroll Now APCSA,AP Physics & APCSP Classes Starting September/October Learn Python, Java & Web Design AP Cybersecurity — New Course Expert-Led · Small Batches · Hands-On Projects Contact: oggntech@gmail.com
Study Notes

Big Idea 2 — Data

How computers represent data with bits, how data is shrunk for storage and transmission, and how people and programs turn raw data into useful information. This Big Idea is worth 17–22% of the AP exam. Each section ends with a short practice set — click "Show answer" to check yourself.

Big Idea 1 — Creative Development

How computing innovations are made: working with others, understanding what a program does and why, following a design process, and finding and fixing mistakes. This Big Idea is worth 10–13% of the AP exam and also underpins the Create Performance Task. Each section ends with a short practice set — click "Show answer" to check yourself.

2.1

Binary Numbers

Computers store everything — numbers, text, images, sound — as a sequence of bits. A bit (binary digit) is either 0 or 1. A group of 8 bits is a byte.

  • Binary (base 2) uses two digits; each position is a power of 2 (…, 16, 8, 4, 2, 1), unlike decimal (base 10).
  • Abstraction — the same bits can mean different things (a number, a letter, a color) depending on how the program interprets them.
  • Analog data varies smoothly and continuously (sound waves). Computers capture it by sampling — measuring at regular intervals — to get digital data. More samples means a closer match to the original.
Place value8421Decimal
101110118 + 2 + 1 = 11
110111018 + 4 + 1 = 13
  • n bits can represent 2n different values, from 0 up to 2n − 1. Adding one bit doubles the number of values.
  • To represent N distinct items, you need enough bits so that 2n ≥ N.
  • Overflow error — a result is too large for the fixed number of bits available.
  • Round-off error — some real numbers (like 1/3 or 0.1) can't be stored exactly in binary, so the computer stores a close approximation.
  • Examples of representation: text via ASCII/Unicode codes, images as pixels with red-green-blue values, sound as sampled amplitudes.
Quick check: 8 bits = 28 = 256 values (0 to 255). 3 bits = 8 values (0 to 7).
Practice

1. Convert binary 11001 to decimal.

Show answer
16 + 8 + 0 + 0 + 1 = 25.

2. What is the minimum number of bits needed to give 100 students each a unique ID?

Show answer
7 bits. 26 = 64 is too few, while 27 = 128 ≥ 100.

3. A program stores a counter in 4 bits and adds 1 to the value 15. What happens?

Show answer
An overflow error: 4 bits only hold 0–15, so 16 can't be stored correctly.
2.2

Data Compression

Data compression reduces the number of bits needed to store or transmit data. Smaller files save storage space and send faster over a network. There are two types:

TypeHow it worksExamples
LosslessOriginal data can be perfectly reconstructed; no information is lostZIP, PNG, GIF, FLAC
LossyDiscards some data permanently, so the original cannot be fully restored; usually a much smaller fileJPEG, MP3, MP4
  • Trade-off — lossy gives smaller files but lower quality; lossless keeps quality but saves less space.
  • Choose based on need: lossless for text, code, or medical images where every bit matters; lossy for streaming video or music where small quality loss is acceptable.
  • Lossless compression often finds repeated patterns. Example — run-length encoding:
Original :  AAAABBBCC     (9 characters)
Compressed: 4A3B2C        (6 characters)
// Decompressing gives back AAAABBBCC exactly, so this is lossless.
Remember: if the question says the data can be restored exactly, it's lossless. If quality is reduced to save space, it's lossy.
Practice

1. A photographer needs to keep an image exactly as captured so it can be edited later. Which compression type is better?

Show answer
Lossless — it preserves every detail of the original.

2. Give one advantage and one disadvantage of lossy compression.

Show answer
Advantage: much smaller files that store and stream faster. Disadvantage: some original data is permanently lost, so quality drops.

3. Compress WWWWWWWXXY using run-length encoding.

Show answer
7W2X1Y
2.3

Extracting Information from Data

Data is raw values; information is the meaning and patterns drawn from it. Computing lets us find trends in datasets far too big for people to analyze by hand.

  • Metadata — data about data (e.g. a photo's date, location, size, or author). It helps organize, find, and group data, and changing it doesn't change the main data.
  • Big data — extremely large datasets that need computers (often many working together) to process.
  • Correlation is not causation — two things changing together doesn't prove one causes the other.
  • Data cleaning — fixing problems such as incomplete, duplicate, invalid, or inconsistent entries so results are accurate.
  • Bias in data — a dataset that leaves out groups or is collected unfairly can lead to misleading conclusions.
  • Combining data sources can reveal new insights (e.g. weather data plus sales data), but can also raise privacy concerns.
  • Scalability — a solution that still works well as the amount of data grows.
Exam tip: when a conclusion is drawn from data, ask: is the data complete, unbiased, and clean? Is it showing correlation or true cause?
Practice

1. A phone photo records the time and GPS location it was taken. What is this extra data called?

Show answer
Metadata — data about the photo.

2. Ice-cream sales and sunburn cases both rise in summer. Does this show that ice cream causes sunburn?

Show answer
No. They are correlated because a third factor, hot sunny weather, affects both. Correlation does not prove causation.

3. A survey about a school's lunch menu only asks students in one grade. Why might the results be misleading?

Show answer
The data is biased and incomplete; it doesn't represent all students, so conclusions about the whole school may be wrong.
2.4

Using Programs with Data

Programs help us collect, store, process, and visualize data. Data can come from files, databases, sensors, websites, or user input, and programs let us work with it at scale.

OperationWhat it doesExample
FilteringKeeps only items that meet a conditionOnly scores of 70 or above
Searching / countingFinds items or counts matchesHow many orders came from Mumbai
CombiningMerges data from multiple sourcesJoin student names with test scores
CleaningRemoves or fixes bad entriesDelete duplicate rows
TransformingChanges format or computes new valuesConvert Celsius to Fahrenheit
passing <- []
FOR EACH score IN scores
{
    IF (score >= 70)
    {
        APPEND(passing, score)     // filtering
    }
}
DISPLAY(LENGTH(passing))           // counting
  • Tools — spreadsheets, databases, and programs can all be used to analyze data; programs are best for large or repeated tasks.
  • Visualizations (charts, graphs, tables) make patterns easier to see and communicate.
  • Challenges — data can be messy, huge, biased, or in different formats; cleaning and checking it is a major part of the work.
  • Privacy and security — collecting and combining personal data must be done responsibly.
Create Task link: storing data in a list and processing it with a loop is the data abstraction your own program usually needs to show.
Practice

1. A program removes all rows with missing values from a survey file. Which operation is this?

Show answer
Cleaning (or filtering) the data.

2. Why is a program better than a person for analyzing a dataset of 10 million records?

Show answer
A program processes huge amounts of data quickly, consistently, and without fatigue, and can be re-run on updated data.

3. Why might a bar chart help when sharing results of a data analysis?

Show answer
A visualization makes patterns and comparisons easy to see and understand at a glance, compared with a raw table of numbers.