Magic or Mathematics?
Chapter Field Guide
- Powers of two and positional notation: how six binary choices describe 64 possible states.
- Discrete mathematics and digital logic: bits, bytes and exclusive OR (XOR).
- Information theory: even and odd parity, redundancy, and the difference between detecting and correcting errors.
- Phones and computers represent letters, photographs and sound using digital information.
- Communication systems and storage devices use error-control techniques to help protect data.
- A simple card trick reveals the mathematics behind a machine’s decisions.
- Read and create binary numbers, perform two mathematical magic tricks, and explain why they work.
- Build three JavaScript experiments that detect a changed message or locate a flipped bit.
- Recognize when a check cannot guarantee correctness; think like an engineer testing a system.
Measurable Learning Outcomes
- Convert integers between decimal and 6-bit binary notation.
- Explain why an even-parity bit detects any single-bit flip but misses an even number of flips.
- Use row and column parity in a 2D grid to locate and repair a single flipped bit.
- Apply XOR operations in JavaScript to compute and verify parity.
Core Scientific Intuition
Computers store text, images, and sound as sequences of two-state symbols called bits (0 or 1). Positional notation multiplies each bit by a power of two, so 6 bits represent 2^6 = 64 distinct states (0 through 63). Adding one extra parity bit makes the total count of 1s even (or odd), giving a receiver a fast mathematical check for single-bit transmission errors.
Units & assumptions: Each bit b_i is 0 or 1; represents unsigned integers from 0 to 63.
Worked Example
For the secret number 29: 29 = 16 + 8 + 4 + 1, so the 6-bit pattern is 011101. It contains four 1s (already even), so its even-parity bit is 0. If noise flips bit 3 to produce 010101, the count of 1s becomes three (odd), immediately alerting the receiver.
Hands-On Exploration
Interactive Laboratory
Test the concepts directly with 4 interactive panels, live controls, and visual feedback.
Open Interactive Lab →Three Guided Projects
Structured experiments with hypotheses, boundary tests, hints, and reflection prompts.
View 3 Projects →Source Code (4 Snippets)
Inspect byte-identical printed JavaScript blocks, download `.js` files, or test runnable blocks in the isolated sandbox.
Browse Code →Self-Check Quiz (5 Questions)
Immediate explanations for every choice, unlimited retries, and local-only score tracking.
Take Self-Check Quiz →Book Chapter Outline (Reference Guide)
Section headings from Volume 1 for cross-referencing with the printed book.
Show all 47 book section headings
- A guide to the science and activities in this chapter.
- Two surprising tricks reveal how information follows rules.
- Can a machine read your mind?
- Four more questions
- The impossible memory trick
- Try it with a partner
- Meet the pioneers
- Gottfried Wilhelm Leibniz (1646-1716)
- George Boole (1815-1864)
- From logic to reliable messages
- Claude Elwood Shannon (1916-2001)
- Richard Wesley Hamming (1915-1998)
- When machines made mistakes
- 1937 to 1938: Claude Shannon
- 1950: Richard Hamming
- The secret language of machines
- Why six questions are enough
- From a trick to an algorithm
- Give every message a guardian
- The rule that protects the message
- Find the flipped card
- Why the corner works
- One operation, many possibilities
- Meet XOR
- Build a mind reader
- Read the program like a recipe
- Build a digital detective
- Take the detective apart
- What the code is doing
- A damaged message from Mars
- Make the receiver miss an error
- Experiment before you explain
- Keep a scientist’s notebook
- 07 / Detective mission: emergency on Mars
- Decode the damaged transmission
- 08 / What if the system gets it wrong?
- Now you are the inventor
- 1: A bigger mind-reading machine
- 2: A language made of lamps
- 3: Protect a pixel picture
- 4: A reliable toy messenger
- Mission answers
- Your field guide to new ideas
- 11 / What you now know
- Next chapter: The secret mathematics of everyday numbers
- More to discover
- Meet the recurring cast
Primary Sources & Further Reading
External links are provided for independent verification and deeper study. Link availability can change over time; see the Resources page for verification notes.