News for hackers. Stuff that matters.
Re:Mathematics for Programmers [pdf] by alblue on Thursday September 24, 2020 @03:26AM (#24576193)
You probably do this all the time with time without realising it.

If it’s 11 o’clock and we agree to meet in two hours, you instinctively know I’m talking about 1 o’clock. But what you’ve just done is add two numbers mod(ulus) 12.

In effect your brain added 11+2 to get 13, then took away 12 to make it fit, and came up with the modulus (or remainder) of 1.

Modulus arithmetic is therefore sometimes known as clock arithmetic.

Re:Mathematics for Programmers [pdf] by mbeex on Thursday September 24, 2020 @04:05AM (#24576420)
> In effect your brain added 11+2 to get 13, then took away 12 to make it fit

Not my German brain. But mod 24, I'm with you again :) And don't let me start with the Russians, they did it in hardware:

https://en.wikipedia.org/wiki/24-hour_analog_dial#/media/Fil...