Modulus Counting in Processing

Simon wrote a modulus counting program in Processing after we were discussing why

1 % 2 = 1 and why 2 % 4 = 2. He basically told me he simply knew 1 % 60 equals 1, but he didn’t know why.  We realized later that the strange result comes from the fact that if a number (the divisor) fits into another number (the numerator) zero times then, in modulus counting, that numerator becomes the excess.

 

DSC_0407

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s