Skip to content
Back to notes
Computer Science· 3 min read

Code — Chapter 2: Codes and Combinations

Exploring Braille, mathematical combinations (2ⁿ), and how two-state systems scale to represent complex information.

Part of the series on Code: The Hidden Language of Computer Hardware and Software.


Expanding the Concept of a Code

Chapter 2 shifts from “We can represent information with signals” to:

“How much information can we represent using combinations of a small number of states?”

A code doesn’t necessarily mean something secret. Language itself is a code. The letter A is just a shape; there’s nothing physically inherent in that shape that means a particular sound. Humans agreed on its meaning.

Similarly:

  • Red traffic light \rightarrow stop
  • Green traffic light \rightarrow go

The physical thing and its meaning are separate. A code establishes the mapping between them.


Braille

The major example in this chapter is Braille. Braille represents characters using raised dots arranged in a cell.

A traditional Braille cell contains six possible dot positions:

● ●
● ●
● ●

For each position, there are two possibilities: raised or not raised.

Each dot position doesn’t need six different states — it needs only two.


Combinations & Binary Scaling

If there were only 1 dot position:

  • 0 = not raised
  • 1 = raised
  • Total: 21=22^1 = 2 possibilities

With 2 dots:

  • 00, 01, 10, 11
  • Total: 22=42^2 = 4 possibilities

With 3 dots:

  • 000, 001, 010, 011, 100, 101, 110, 111
  • Total: 23=82^3 = 8 possibilities

The General Pattern

Possibilities=2n\text{Possibilities} = 2^n

  • 1 position 21=2\rightarrow 2^1 = 2
  • 2 positions 22=4\rightarrow 2^2 = 4
  • 3 positions 23=8\rightarrow 2^3 = 8
  • 4 positions 24=16\rightarrow 2^4 = 16
  • 5 positions 25=32\rightarrow 2^5 = 32
  • 6 positions 26=64\rightarrow 2^6 = 64

Six two-state positions produce 64 distinct combinations. Something constructed purely from raised / not raised can represent dozens of different symbols. This is one of the central mathematical foundations of digital computers.


Connecting Chapters 1 & 2

CHAPTER 1
Information → Encoded using simple signals → dot / dash

CHAPTER 2
Two possible states → Combine n positions → 2ⁿ combinations → Rich multi-symbol meaning

This points directly toward digital computing:

ContextTwo-State System
Morsedot / dash
Brailleraised / not raised
Digital Systems0 / 1
Electrical Circuitsoff / on

The physical representation changes; the underlying principle remains identical.


Core Takeaways Before Chapter 3

  1. What is a code? A convention for representing one kind of information using another set of symbols or states.
  2. Encoding vs. Decoding: Encoding converts information into representation; decoding recovers the original information.
  3. Representation is separate from meaning: Physical signals carry no inherent meaning until we assign rules.
  4. Two states scale exponentially: Combining nn independent two-state choices yields 2n2^n combinations.
  5. The physical medium isn’t fundamental: Light, sound, marks on paper, raised dots, or electrical voltages can all carry encoded information.

One-Sentence Summaries

  • Chapter 1: Information can be communicated by translating it into an agreed system of simple signals.
  • Chapter 2: Combining multiple simple two-state choices creates enough distinct patterns to encode increasingly complex information.