modular arithmetic دراصل دائرے پر arithmetic ہے۔ دو اعداد modulo n congruent تب ہوتے ہیں جب ان کا فرق n کے کسی multiple کے برابر ہو۔ گھڑی mod 12 arithmetic کرتی ہے: 5 بجے کے 10 گھنٹے بعد 3 بجتے ہیں، 15 نہیں۔ یہی سادہ تصور جدید cryptography، hash functions، error-correcting codes اور number theory کے بڑے حصے کی بنیاد بنتا ہے۔
mod 4، mod 5 یا mod n میں addition اور multiplication نئے، بند arithmetic systems بناتے ہیں۔
| + | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| 0 | 0 | 1 | 2 | 3 | 4 |
| 1 | 1 | 2 | 3 | 4 | 0 |
| 2 | 2 | 3 | 4 | 0 | 1 |
| 3 | 3 | 4 | 0 | 1 | 2 |
| 4 | 4 | 0 | 1 | 2 | 3 |
modular arithmetic congruence کو بیان کرتی ہے: a ≡ b (mod n) تب جب n، a−b کو divide کرے۔ Gauss نے 1801 میں اسے منظم theory کی شکل دی۔ جدید public-key cryptography اسی پر کھڑی ہے: RSA encryption Fermat’s Little Theorem اور متعلقہ modular identities پر انحصار کرتی ہے۔ hash functions بھی modular operations کے ذریعے بڑی inputs کو fixed-size outputs میں map کرتے ہیں۔ integers mod n ایک مکمل ring بناتے ہیں، اور جب n prime ہو تو یہی structure ایک finite field بن جاتا ہے۔