Logic
Truth table builder
Use variables like p, q, r with !, &&, ||, ->, <->, xor, parentheses.
| p | q | result |
|---|---|---|
| F | F | T |
| F | T | T |
| T | F | T |
| T | T | T |
Tautology
Discrete math, taught interactively
Interactive discrete math for CS students: topics, proof trainer, practice, and browser-native tools.
Calculators
All calculations run in the browser with validated inputs and shareable route URLs.
Logic
Use variables like p, q, r with !, &&, ||, ->, <->, xor, parentheses.
| p | q | result |
|---|---|---|
| F | F | T |
| F | T | T |
| T | F | T |
| T | T | T |
Tautology
Sets
A = {1, 2, 3, 5}
B = {2, 4, 5, 8}
A union B = {1, 2, 3, 5, 4, 8}
A intersection B = {2, 5}
A - B = {1, 3}
B - A = {4, 8}
Symmetric difference = {1, 3, 4, 8}Number theory
numbers: 84, 126, 210 gcd: 42 lcm: 1260
Representation
255 base 10 = 255 base 10 255 base 10 = FF base 16
Counting
n! = 3628800 P(n,r) = n! / (n-r)! = 720 C(n,r) = n! / (r!(n-r)!) = 120
Modular arithmetic
(17 ^ 5) mod 7 = 5
Source tools
Formula references
¬(p ∧ q) ≡ ¬p ∨ ¬q¬(p ∨ q) ≡ ¬p ∧ ¬qp → q ≡ ¬p ∨ qp → q ≡ ¬q → ¬pp ↔ q ≡ (p → q) ∧ (q → p)p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)p ∨ (p ∧ q) ≡ pAssume P. Derive Q. Therefore P → Q.Prove ¬Q → ¬P instead of P → Q