Register for free to see more content

### Theory:

The idea of modular arithmetic was proposed by Carl Fredrick Gauss, a German mathematician called the "Prince of mathematicians". |

The process of wrapping around numbers when a certain value is attained is called

modular arithmetic.

The best example to explain the concept is the clock.

The clock shows the time for \(24\) hours using only \(12\) numbers, \(1\), \(2\), \(3\),..., \(11\) and \(12\). After \(12\), we use \(1\) again for \(13\) hours, \(2\) for \(14\) hours and so on. Here, the numbers are wrapped again from \(1\) to \(12\) to represent \(13\) to \(24\) hours. This way of again wrapping the numbers after a certain value is called modular arithmetic.

Reference:

Image source: https://commons.wikimedia.org/wiki/File:Carl_Friedrich_Gauss_1840_by_Jensen.jpg