Understand how bits become text, pictures and sampled signals. Predict representation size, test encoding choices, and explain when compression is worth the tradeoff.
This unit uses the same routine established in Unit 1. Your website is the organizer; CodeHS, AP Classroom, and the student workbook are its connected resources.
1 · WebsiteOpen the numbered lesson and see the model.
2 · Video resourcesFollow the assigned CodeHS and AP Daily work.
3 · WorkbookSTRIDES notes, vocabulary, diagrams and predictions.
4 · Coding & labsTest the model; explain evidence and revise.
START → OPEN WEBSITE LESSON + WORKBOOK
↓
READ EXAMPLES & WATCH ASSIGNED VIDEOS
↓
VOCABULARY → STRIDES → DIAGRAM → PSEUDOCODE
↓
MAKE A NUMERICAL PREDICTION → RUN THE LAB
↓
Did the observed result match your prediction?
NO
Trace the representation rules, identify the cause, revise, and test again.
YES
Record evidence, explain why it worked, and check off the tracker.
Model habit: Before testing a 4-bit binary number, predict the largest value the representation can store. Then set the model to that value, add one, and explain the result using the bit width—not a guess.
How Unit 2 fits the course
Eight-unit course roadmap
1 · FoundationsComputational thinking
2 · Digital InformationBits, text, images, sampling and compression
3 · Logic & ControlAlgorithms and selection/iteration
4 · AbstractionLists and procedures
5 · AlgorithmsEfficiency and simulation
6 · SystemsNetworks and security
7 · Data & SocietyExtracting information and impacts
8 · Create & ReviewPerformance task and AP preparation
Scope note: College Board Big Idea 2 (Data) includes Topics 2.1–2.4. This unit concentrates on 2.1 Binary Numbers and 2.2 Data Compression. Topics 2.3–2.4 (extracting information and using programs with data) return in Unit 7. CodeHS 8.10 Cryptography is deferred to our Unit 6.
8.3.8; 8.4.7; 8.6.9; 8.8.7; optional 8.11.1 after assigned lessons
2.1 and 2.2 synthesis
26–28
□
Guided notes, illustrations and worked examples
Read the worked example first, then complete the different questions in your student workbook. Expand “Illustrate and plan” for the investigation setup.
LESSON 2.1 · WORKBOOK pp. 8–10
Binary Numbers & Place Value
Represent unsigned whole numbers using bits and explain why computers use binary.
1 · This website
Read the worked example; make a prediction; use the named lab below.
STRIDES, visual model, prediction, pseudocode and lab reflection on pp. 8–10.
Core notes
A binary position represents a power of two (1, 2, 4, 8, ...).
A fixed number of bits limits the number of distinct patterns: 2^n.
Vocabulary
bit
A single binary digit, 0 or 1.
byte
A group of 8 bits.
binary
A base-2 number system using 0 and 1.
place value
The weight assigned to a digit by its position.
Worked example
Convert 00101101 from unsigned binary to decimal. Show the weights you add.
Reasoning: 32 + 8 + 4 + 1 = 45.
Practice before testing
Explain what changes between decimal place values and binary place values.
Why does a computer need an agreed-upon encoding to interpret a bit pattern?
Illustrate and plan
Diagram: Draw an 8-bit place-value strip. Label 128, 64, 32, 16, 8, 4, 2, 1 and shade the 1-bits for 45.
Algorithm planning: READ an unsigned decimal integer 0..255; for each descending weight, write 1 if the remaining value is at least the weight, subtract it, otherwise write 0.
Investigate: Use the website Binary Explorer and CodeHS Binary Game. Try 13, 45 and 127; record a prediction before checking.
LESSON 2.2 · WORKBOOK pp. 11–13
Capacity, Overflow & Hexadecimal
Predict fixed-width overflow and translate among binary, decimal, and hexadecimal.
1 · This website
Read the worked example; make a prediction; use the named lab below.
Investigate: Complete the Unit 2 Digital Encoding Studio and compare your final choices against a hard size budget.
Interactive Digital Information Lab
Each experiment has a prediction question, a working model and an observation to record. Calculated sizes are raw payload estimates unless otherwise stated.
Lab A · Binary Explorer and overflow
Eight unsigned bits have place values from 128 to 1. Click bits or use the decimal slider to change the pattern.
Predict what happens to 1111 when you add one using only four bits.
Workbook: 2.1 pp. 8–10; 2.2 pp. 11–13. Underflow, signed integer conventions, and arbitrary-precision behavior are outside this simple unsigned model.
Lab B · Text to UTF-8 bytes
Different encodings interpret the same bytes differently. This explorer shows each UTF-8 byte and its binary representation. Try DATA, café, and 🚀.
UTF-8 bytes differ from character counts; the page reports Unicode code points as well as bytes. Workbook lesson 2.3 pp. 14–16.
Lab C · Pixel canvas and RGB storage
Click cells to paint an 8×8 raster. Change the RGB sliders and notice how the visible color changes while the raw 24-bit RGB payload size stays fixed.
One-bit black/white format: 64 bits = 8 raw bytes. Full 24-bit RGB: 1536 bits = 192 raw bytes. No file header or compression is counted. Workbook 2.4 pp. 17–19.
Lab D · Analog sampling and quantization
A continuous sine wave is sampled at equally spaced times, then each sampled amplitude is rounded to one of a finite number of levels.
The model uses one smooth sine period and simple uniform rounding. Error shown is mean absolute difference at sampled positions; it does not establish perfect signal reconstruction. Workbook 2.5 pp. 20–22.
Lab E · Run-length encoding (lossless)
For this model, each run is stored as one byte for count (1–255) and one byte for the ASCII symbol. This is a defined instructional format, not a standard compressed file format. Choose a message of ASCII letters or digits.
Try ABABAB and AAAAAAAAAAAAAAAA. Why does one expand? Workbook 2.6 pp. 23–25.
Lab F · Digital Encoding Studio: meet the payload budget
A field station can send at most 10 payload bytes. Its eight-character ASCII status already uses eight bytes. Compare a raw 8×8 black-and-white icon with run-length encoding of the current pixel grid. Headers and metadata are intentionally excluded from the payload-only comparison—identify their cost separately in your design.
Use your workbook project pages 29–32 for your diagram, metadata decisions, reconstruction evidence and claim/evidence/reasoning response. A uniform icon has just one run; a checkerboard has many short runs.
AP-style concept checks
These are original formative questions. They are not copied from AP Classroom. Make your choices before checking the explanations.
Q1. Which unsigned decimal number is represented by 00010110?
Q2. How many different bit patterns exist in six bits?
Q3. What happens to 15 + 1 in a fixed 4-bit unsigned wraparound model?
Q4. Why does a text decoder need a known encoding?
Q5. How many data bits are in an 8×8 monochrome image at one bit per pixel?
Q6. An 8×8 RGB image uses 24 bits per pixel. How many raw bytes?
Q7. Which change increases the number of amplitude levels available in quantization?
Q8. For a message that must be reconstructed exactly, choose
Q9. Why can run-length encoding increase file size?
Q10. Which is a defensible encoding design justification?
Use CodeHS 8.11.1 only after deciding which Module 8 sections you assigned, since this website intentionally moves cryptography (8.10) into the later security unit.
AP Classroom: assign selected Topic 2.1 and 2.2 videos/questions now; postpone 2.3 and 2.4 until students encounter data analysis.
Important: The official 2026–27 AP CSP course description remains the reference for this unit. The announced AP CSP redesign takes effect for 2027–28, not this school year.