They are congruent, indicated by a triple-equals sign: 14 ≡ 2 mod 12.Īnother example: it’s 8:00. The equation “14 mod 12 = 2 mod 12” means, “14 o’clock” and “2 o’clock” look the same on a 12-hour clock. We do this reasoning intuitively, and in math terms: The sneaky thing about modular math is we’ve already been using it for keeping time - sometimes called “clock arithmetic”.įor example: it’s 7:00 (am/pm doesn’t matter). In fact, you can see if there’s an even being multiplied anywhere the entire result is going to be zero… I mean even :). What’s even x even x odd x odd? Well, it’s 0 x 0 x 1 x 1 = 0. Why’s this cool? Well, our “odd/even” rules become this:Ĭool, huh? Pretty easy to work out - we converted “properties” into actual equations and found some new facts. An odd number is “1 mod 2” (has remainder 1). For example, “5 mod 3 = 2” which means 2 is the remainder when you divide 5 by 3.Ĭonverting everyday terms to math, an “even number” is one where it’s “0 mod 2” - that is, it has a remainder of 0 when divided by 2. The modulo operation (abbreviated “mod”, or “%” in many programming languages) is the remainder when dividing. Perhaps not as immediately useful as even/odd, but it’s there: we can make rules like “threeven x threeven = threeven” and so on.īut it’s getting crazy. A number like “4” is 1 away from being threeven (remainder 1), while the number 5 is two away (remainder 2).īeing “threeven” is just another property of a number. You’ll notice a few things: there’s two types of throdd.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |