Unit 1 · Digital Information · Lessons 1.11–1.12 · Mini-Project

Secret Messages in Bits

For six lessons you used encodings other people invented. Now you invent one — and find out what it costs.

Big Idea 2 — Data2 days · 20 points
This page is the instructions. The paper packet is where you actually write — you'll get it in class. Keep this open alongside it.
1

The Task

Build your own scheme for turning letters into bits. Use it to encode a message. Hand it to a partner who has to get your exact message back out.

Your partner gets your table and your bits. Nothing else. No explaining. No hints. No "oh wait, I meant…"

If they can't recover your message, your encoding didn't work — and that is useful information, not a failure. Step 4 asks you to diagnose it, and diagnosing it correctly is worth the same points as getting it right the first time.

2

Scope — read this before you start

Fixed-width is the assignment. Every symbol gets the same number of bits. Do not attempt variable-length codes unless everything else is finished and you've read the Challenge at the bottom. Every year, someone tries it on day one, produces an undecodable message, and loses a period.
3

The Five Steps

1How many bits do you need?

Do the arithmetic before you assign a single code. This is the whole design decision, and it is the same counting skill from 1.1: every bit you add doubles the patterns available.

You must answer three things: how many symbols your message needs, the smallest number of bits that works, and — this is the part people skip — why the next size down does not work. "5 bits" with no pattern count is half credit.

2Build your encoding table

A bit pattern for every symbol. Same length for all of them. No duplicates. This table is your encoding — hold onto that phrase, you'll need it in the writing.

3Encode your message

8 to 15 characters, something a classmate would find worth decoding. Group the bits by symbol so you can check your own work, then count: characters × bits each = total bits.

4Trade

Hand over your table and your bits. Say nothing else. Copy your partner's bits down before you start decoding, so you have a record of what you were actually given.

If it fails, say specifically where: was the problem in their table, their encoding, or your decoding? "It didn't work" earns nothing. "Their table has B and R both as 00001" earns full marks.

5Compare against ASCII

ASCII spends 8 bits per character. Work out your message both ways and find the difference.

Then the question the whole project is built around: ASCII is bigger. So why does every computer on Earth use ASCII instead of your scheme? Think hard about what your partner needed from you in Step 4.

4

Check Your Arithmetic

Work Steps 1 and 3 out on paper first. Then use this to check yourself — it will tell you whether your reasoning holds, not what to write.

5

The Writing — worth more than the rest combined

One paragraph, 5–8 sentences. Budget real time for it. You must use all three of these words correctly:

bitA single 0 or 1 — the smallest unit. Not a letter, not a byte, not "a small amount of data."
encodingThe agreed rule mapping symbols to bit patterns. Your table is your encoding.
abstractionHiding detail behind an interface. Your partner used your table without knowing how you chose it.

Your paragraph must answer all four:

Weak

"My encoding is more efficient than ASCII because it uses fewer bits. Each letter is a bit. It's an abstraction because it hides the letters."

Strong

"…so 4 bits was not enough (only 16 patterns) and I used 5 bits per symbol, which gives 32 and leaves 5 unused… mine is smaller for this message — but only because I threw away everything ASCII can represent and I can't: lowercase, punctuation, digits… my encoding only works for someone who has my table, and ASCII works for everyone."
Notice what the strong version refuses to do. It does not claim its scheme is better. It says smaller, names the baseline, and names the cost. That refusal is the skill being trained here, it is worth points on this project, and it is exactly what the AP written responses reward for the rest of the year.
6

How the 20 Points Split

Half the project is the paragraph. Plan your two days accordingly.

Steps 1–5: arithmetic, table, encoding, trade, ASCII comparison10
Paragraph — uses bit, encoding, abstraction correctly6
Paragraph — justifies the bit count with pattern arithmetic, not assertion2
Paragraph — names what you gave up, and does not over-claim2
Total20
7

Why This Is on the Exam

Big Idea 2 questions about encoding almost always come down to one skill: counting patterns. "How many bits are needed to represent N things" and "how many things can n bits represent" are the same question asked in both directions, and they are guaranteed points if you're fluent. Step 1 is that exact question with your own message attached to it.

The last two rubric rows train something else. The exam's written responses reward describing a tradeoff precisely, and punish claiming more than your evidence supports. "Smaller than 8-bit ASCII for this message, at the cost of losing lowercase" scores. "More efficient" does not.

8

Challenge — only after everything else is done

Give your most common letters shorter codes. It saves bits, and it introduces a trap.

If A=0, B=1, and C=01, then the bits 01 could mean A-then-B, or it could mean C, and nobody can tell which. A variable-length code only works if no code is the beginning of another code.

Try E=0, T=10, A=110, O=111 and decode 0110100 — it has exactly one possible reading. Then explain in two sentences why the fixed-width scheme you built on page 1 never has this problem.

← 1.10 Bits in Python