Clock (or Modulo) Arithmetic

0 Conversations

What time is it four hours after ten o'clock? Two o'clock, right? Well done, you show some understanding of modulo arithmetic - to whit 10 + 4 is 2 working modulo 12. A mathematician might write

__
10
 
+
_
4
 
=
_
2
or 10 + 4 ≡ 2 (mod 12)1



and this entry will use the latter notation2. Said mathematician would also say that 14 ≡ 2 (mod 12), even though we wouldn't use 14 o'clock when telling the time. Also 26, 38 and -10 are equivalent (denoted ≡) to 2 (and to each other) modulo 12.

The general rule we are using here is that a number is equivalent (written ≡) modulo 12 to another number if the difference between them is a multiple of 12. Of course it makes sense to use the smallest positive numbers we can as representatives of the equivalence classes3. So we would work with 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11 rather than 73, 74, 75, 76, 77, 78, 79, 80, 81, 82 and 83. What about 12 itself, though? Well we use 0 instead. Just makes things easier, you know?

By the same rule, -31 ≡ 1 (mod 2) and 86 ≡ 0 (mod 2) and 48 ≡ 0 (mod 2). In fact working modulo 2 just divides the integers into odd and even numbers.

Multiplication

So we can add numbers modulo a number. Can we also multiply them? Well

1The brackets around "mod 12" are optional, but used here for clarity.2Because the former is really hard to do in guideML3Mathematical term, this.

Bookmark on your Personal Space


Conversations About This Entry

There are no Conversations for this Entry

Entry

A874235

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry


Written and Edited by

Disclaimer

h2g2 is created by h2g2's users, who are members of the public. The views expressed are theirs and unless specifically stated are not those of the Not Panicking Ltd. Unlike Edited Entries, Entries have not been checked by an Editor. If you consider any Entry to be in breach of the site's House Rules, please register a complaint. For any other comments, please visit the Feedback page.

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more