Back to Discover
Curiosity

Anatomy of a QR Code: What Shapes the Pattern?

How QR code version controls module count, how mask patterns sculpt the dark/light texture of the data area without changing the data, and how data mode rewrites which characters are converted into bits.

Before you enter

A complete interactive classroom, not just a preview.

Start when you are ready to enter this Stage's 8 scenes and explore, respond, and learn as you go.

8
Scenes
16 min
Estimated
Content language: en-US
Start this Stage
Sign-in may be required to play
What happens inside
  1. 01Three Switches Behind Every QR Codeslide
    Question

    Introduce the driving question by showing three seemingly identical QR codes and asking which slider — version, mask, or data mode — changed each one.

    • Version, mask, and data mode are the three orthogonal inputs
    • The final image is shaped by all three at once
    • Each switch leaves a distinct visual fingerprint
  2. 02What Changes When You Flip a Switch?quiz
    Prediction

    Let the learner commit to one prediction: which of the three switches (version, mask, data mode) most directly controls the SIZE of a QR code?

    • Make one independent choice before seeing evidence
    • Commit to a hypothesis to test against the visual proof
  3. 03Flip the Switches, Watch the Dots Moveinteractive
    Evidence

    An interactive panel where the learner keeps the input text constant and independently changes version, mask pattern, and data mode, watching the QR code regenerate live.

    • Changing version grows or shrinks the module grid
    • Changing mask scrambles texture without changing size
    • Changing data mode can rearrange dots even at the same version and mask
  4. 04Version = Grid Size, Mask = Texture, Mode = Bit Streamslide
    Explanation

    Explain each switch's role: version fixes the module count from 21×21 up to 177×177, mask XORs the data region with one of 8 patterns to balance light/dark, and data mode rewrites which bit patterns represent the same characters.

    • Version sets the fixed module grid (21 + 4·(V−1))
    • Mask pattern XORs data modules to avoid large run-lengths
    • Data mode changes the bit encoding of the input characters
  5. 05Same Text, Eight Different Facesslide
    Evidence

    Show a 3×3 grid: one row comparing versions of the same text, one row comparing all 8 mask patterns at a fixed version, one row comparing data modes. The pattern of differences makes each switch's signature obvious.

    • Version row: outer grid size changes, content shifts
    • Mask row: same grid size, data region texture scrambles
    • Mode row: same grid size and mask, dot positions still shift
  6. 06When a Switch Has No Effectinteractive
    Boundary

    Show the limits: switching to a mode that cannot represent the input forces a different encoding, and downgrading version can fail outright if capacity is exceeded. The learner tries to break each switch.

    • Lowering version below required capacity fails to render
    • Some data modes cannot encode certain character sets
    • Mask choice has no effect on decoded data, only on appearance
  7. 07Apply It: Design This Codequiz
    Transfer

    One transfer question: given a short URL that must fit on a business card, the learner chooses the combination of version, mask, and mode that produces the smallest, cleanest-looking QR code.

    • Transfer the explanation to a new constraint
    • Choose version for capacity, mode for compactness, mask for visual cleanliness
  8. 08The Three Switches, Answeredslide
    Resolution

    Resolve the driving question directly: version controls size and capacity, mask controls the visual texture of the data region without altering the bits, and data mode controls how the input is translated into the bit stream — and therefore which dots appear.

    • Version → grid size and module count
    • Mask pattern → XOR texture over data modules
    • Data mode → bit encoding of the input string
Discussion

Discussion threads for a Stage aren't available yet.

Where this leads

This path ends here.

Explore more

More in Technology & Computing

See all