AP CSP Unit 1: Digital Information – Complete 2025 Study Guide

AP CSP Unit 1: Digital Information – Complete 2025 Study Guide

This is your complete guide to AP CSP Unit 1: Digital Information. This unit introduces binary, data representation, compression, encoding, and the fundamental idea that **all digital information can be reduced to 1s and 0s**.

What you will learn on this page:
  • How binary numbers work (base-2)
  • How computers represent images, text, color, and sound
  • Lossless vs. lossy compression
  • Overflow, rounding, and limitations of digital storage
  • How data is measured (bits → bytes → kilobytes → …)
  • Exam-style questions and explanations
  • Practice links + tutoring help

Binary: How Computers Store Everything

Unit 1 starts with the most fundamental concept in computer science: computers only understand 1s and 0s. These 1s and 0s are called bits (binary digits).

Binary Place Values (Base-2)

The binary system works like the decimal system, but powers of 2:

  • 20 = 1
  • 21 = 2
  • 22 = 4
  • 23 = 8
  • 24 = 16
  • … and so on.

Example:

11110₂ = 16 + 8 + 4 + 2 + 0 = 30

10101₂ = 16 + 0 + 4 + 0 + 1 = 21

00110₂ = 0 + 0 + 4 + 2 + 0 = 6

This skill appears on the AP exam, though often in conceptual form rather than direct conversion.

Representing Text: ASCII & Unicode

Text is represented using numeric codes. The AP exam focuses mostly on:

  • ASCII – 7-bit encoding (128 characters)
  • Unicode – 16-bit encoding (65,536+ characters)

ASCII is limited; Unicode allows for emoji, world languages, and special symbols.

Exam Tip: If asked which encoding represents more characters, the answer is always Unicode.

Representing Images: Pixels & Color

Images are represented as grids of pixels, each containing color information stored as numbers.

Color Models

  • RGB – Red, Green, Blue values (0–255)
  • Grayscale – single brightness value

Example:

RGB(255, 0, 0) → Red

Representing Sound: Sampling

Sound is represented using sampling — taking measurements of a sound wave at regular intervals.

Two key factors:

  • Sampling rate – how often samples are taken
  • Bit depth – precision of each sample
Higher sampling rate = better quality = larger file size.

Lossless vs. Lossy Compression

Compression reduces the size of data files. Two types:

Lossless Compression

  • No data lost
  • File can be reconstructed exactly
  • Examples: PNG, ZIP, GIF

Lossy Compression

  • Some data removed permanently
  • Smaller file sizes
  • Examples: JPG, MP3, MP4
Exam Tip: Lossy removes data humans are less likely to notice.

Data Size: Bits, Bytes, & Beyond

Data sizes increase in powers of 2:

  • 8 bits = 1 byte
  • 1,024 bytes = 1 KB
  • 1,024 KB = 1 MB
  • 1,024 MB = 1 GB
  • 1,024 GB = 1 TB

Overflow & Rounding

Digital data has limits. If a number is too big to store, you get:

  • Overflow – number exceeds storage size
  • Rounding – decimals shortened to fit storage limits

AP Exam-Style Questions

Question 1

Which of the following is true about lossy compression?

  • A. It preserves all original data
  • B. It permanently removes some data
  • C. It always produces larger files
  • D. It only works on text files
Answer: B

Question 2

How many unique values can 4 bits represent?

Answer: 2⁴ = 16

Need Help? Get AP CSP Tutoring

Work 1-on-1 with a certified AP CSP teacher to master binary, compression, data representation, and more.

Learn About Tutoring

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

tanner@apcsexamprep.com

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at tanner@apcsexamprep.com