---
title: "An Agreed Code: How the Same Bits Mean Letters or Colours"
description: "Bits need a rule for interpretation. The same pattern can represent a letter or a colour under different codes. To communicate an intended message, sender and receiver need matching rules for the code"
canonical: https://lightmysky.com/learn/computing/an-agreed-code-how-the-same-bits-mean-letters-or-colours-mt_IQY-PHtZVZ
source: https://lightmysky.com/learn/computing/an-agreed-code-how-the-same-bits-mean-letters-or-colours-mt_IQY-PHtZVZ.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# An Agreed Code: How the Same Bits Mean Letters or Colours

Bits need a rule for interpretation. The same pattern can represent a letter or a colour under different codes. To communicate an intended message, sender and receiver need matching rules for the code and how the bits are grouped.

Subject: Computing · Area: Computing Fundamentals · Ages 12 to 13
Page: https://lightmysky.com/learn/computing/an-agreed-code-how-the-same-bits-mean-letters-or-colours-mt_IQY-PHtZVZ

## Ready when they can

- Invent a code for a small set of symbols and use it to send a short message to someone holding the same code
- Show what comes out when the two ends use different codes for the same bits
- Give two things the same bit pattern could stand for in two different files

## Lesson: Both ends must use the same code

You have met bits and bytes as patterns of two states. To interpret a pattern as a message, you need a code: a rule linking patterns to symbols or values. The same bits can have different meanings under different codes. Sender and receiver need matching rules, including how to group the bits. An ordinary code for representing data does not have to keep it secret.

**Example.** For a four-letter practice code, use 00=A, 01=B, 10=C and 11=D. Each letter has a different two-bit pattern. To send DC, replace D with 11 and C with 10: send 11 10. To read it, split it into two-bit groups and use the table in reverse. To invent a code, list the symbols, give each a different pattern, and share the table and group size.

*(drawing: Each letter has its own two-bit pattern.)*

Now define a different practice code for four shades: 00=black, 01=dark grey, 10=light grey and 11=white. Under the letter code, 01 means B. Under the shade code, 01 means dark grey. Real file formats also give rules for interpreting bits, but not every byte in an image directly describes a colour, and not every character uses just one byte.

*(drawing: The bits match. Their stated interpretations differ.)*

If unchanged bits arrive but the receiver uses a different table, the output can differ from the intended message. Check the tables and grouping rules. A readable output alone does not prove that a cable works correctly. To rule out a changed message in an example, we must be told that the received bits match the sent bits.

A shared rule can still be ambiguous. A rule that sends word lengths turns both 'go home' and 'be kind' into 2, 4. Knowing that rule does not tell the reader which phrase was sent. For our four-letter code, different letters have different patterns, so each two-bit group has one listed reading.

**Example.** A fixed-size code says how many bits make one symbol. Start at the left and separate groups of that size. Keep every bit in order. With three bits per symbol, 110010 becomes 110 010. Splitting it into pairs would use a different grouping rule.

**Recap.** Use the stated code and grouping rules to interpret bits. Matching rules help readers recover a message, but an ambiguous code can still leave more than one reading.

*Lesson, questions and flashcards written for this dataset using original practice codes.*

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Why a Computer Works with Only Two Symbols](https://lightmysky.com/learn/computing/why-a-computer-works-with-only-two-symbols-mt_r0wLIjpi5R)

## Opens up

- [Character Sets: Storing Text as Numbers](https://lightmysky.com/learn/computing/character-sets-storing-text-as-numbers-mt_839VNNZlp2)
- [Spotting a Mistake in Stored or Sent Data](https://lightmysky.com/learn/computing/spotting-a-mistake-in-stored-or-sent-data-mt_wKwax55eo-)
