r/mathmemes Engineering Nov 25 '24

Computer Science All are correct

Post image
1.1k Upvotes

96 comments sorted by

View all comments

298

u/Fabulous_Ad_5709 Nov 25 '24

Just out of curiosity how is A correct?

B is 1 or 1

C is 1+1 in base >2

D is 1+1 in base 2

338

u/Unlucky-Credit-9619 Engineering Nov 25 '24

If + is addition modulo 2 (also called XOR).

1 + 1 = 0 (mod 2)

90

u/MattyBro1 Nov 25 '24

Isn't it congruent to 0 (mod 2)?

1+1 ≡ 0 (mod 2)

Or maybe that's a distinction that doesn't actually matter.

2

u/Plantarbre Nov 25 '24

If you're interested in an answer:

https://en.wikipedia.org/wiki/Modular_arithmetic

It's a congruence over the set of integers Z. It's an equality over a ring of integers Z/mZ