Reviewed Aug 2026
DE
BA-02 · LESSON 01

Modular arithmetic

Modular arithmetic wraps numbers around a fixed boundary, like hours on a clock. Bitcoin's signature mathematics uses this kind of arithmetic.

35 min Difficulty 1/5 Not started

Loading lesson visuals...

01

Learn the idea

Modular arithmetic keeps only the remainder after division by a fixed number called the modulus. Written a mod n, two integers are equivalent when they leave the same remainder after division by n. Closure means that applying the group operation to allowed values produces another allowed value. Cryptographic groups use wraparound arithmetic and closure so operations stay inside a finite set.

GUIDED EXPLANATION1/5 ideas inspected
1

Choose a modulus

With modulus 7, the allowed remainders are 0 through 6. Any integer maps to exactly one of those values.

Inspect each idea before the worked example.
The worked example follows the explanation

Inspect every idea above to open it.

Important distinctionThe mod operation discards information randomly.

It deterministically maps every integer to a remainder class. Cryptographic security comes from carefully chosen hard problems, not from unpredictable remainder calculation.

02
FINISH LEARNING FIRST

The questions unlock after every required learning activity

Inspect every guided idea, open the worked example, rebuild its mechanism, and complete the deterministic lesson tool. Your progress is saved automatically.