Mathematical and Logical Operators Test

1. Modulo (Mod) Operator

10 Mod 3 = 1 (Expected: 1)
17 Mod 5 = 2 (Expected: 2)
20 Mod 4 = 0 (Expected: 0)
-10 Mod 3 = -1 (Expected: -1)

2. Integer Division (\) Operator

10 \ 3 = 3 (Expected: 3)
17 \ 5 = 3 (Expected: 3)
20 \ 4 = 5 (Expected: 5)
7 \ 2 = 3 (Expected: 3)

3. Bitwise AND Operator

5 And 3 = 1 (Binary: 0101 And 0011 = 0001 = 1)
12 And 10 = 8 (Binary: 1100 And 1010 = 1000 = 8)
15 And 7 = 7 (Binary: 1111 And 0111 = 0111 = 7)

4. Bitwise OR Operator

5 Or 3 = 7 (Binary: 0101 Or 0011 = 0111 = 7)
12 Or 10 = 14 (Binary: 1100 Or 1010 = 1110 = 14)
8 Or 4 = 12 (Binary: 1000 Or 0100 = 1100 = 12)

5. Logical AND with Booleans

True And True = True (Expected: True)
True And False = False (Expected: False)
False And True = False (Expected: False)
False And False = False (Expected: False)

6. Logical OR with Booleans

True Or True = True (Expected: True)
True Or False = True (Expected: True)
False Or True = True (Expected: True)
False Or False = False (Expected: False)

7. NOT Operator (Unary)

Not True = False (Expected: False)
Not False = True (Expected: True)
Not 0 = -1 (Bitwise NOT)
Not 5 = -6 (Bitwise NOT)

8. Mixed Operations

10 + 3 Mod 2 = 11 (Mod has higher precedence, 3 Mod 2 = 1, 10 + 1 = 11)
20 \ 3 + 2 = 8 (20 \ 3 = 6, 6 + 2 = 8)
(5 And 3) Or 8 = 9 (5 And 3 = 1, 1 Or 8 = 9)

9. AND/OR with Mixed Types (Numeric)

5 And 0 = 0 (Bitwise: 0101 And 0000 = 0000)
10 Or 0 = 10 (Bitwise: 1010 Or 0000 = 1010 = 10)

Summary: All mathematical and logical operators are working correctly!

%>