Logic · operators, proofs, fallacies

If this is true, what else must be?

Logic is the study of which conclusions actually follow from what you already accept. It runs every computer chip, underpins every mathematical proof and is the best defence against a bad argument. Flip the switches, build truth tables, test arguments, step through proofs, and learn to name the tricks people use when the logic doesn’t hold.

Demo 1 · the building blocks

Logical operators

Every statement is either true or false. Operators combine simple statements into compound ones, and each has an exact rule for when the result is true. Pick an operator, flip P and Q, and watch the diagram: the shaded area is everywhere the result is true.

Result
Read it as

“If… then” surprises everyoneP → Q is only false when P is true and Q is false. “If it rains, the street is wet” isn’t broken by a dry sunny day, or by a wet street on a sunny day. A false premise makes the whole “if” true. Logicians call that vacuous truth.
Demo 2 · build

Truth table builder

Type any statement using up to five letters and the operators below. The table lists every possible combination of true and false, works out each part step by step, and tells you whether the statement is always true (a tautology), never true (a contradiction) or depends on the facts.

Verdict

Try a famous law

You can also type not, and, or, xor, implies, iff or ! & | ^ -> <->.

Demo 3 · test

Is the argument valid?

An argument is valid when the conclusion can’t be false while all the premises are true. Validity is about form, not facts: a valid argument with a false premise can still reach a false conclusion. The checker hunts through every row for a counterexample.

Verdict

In plain words
Valid is not the same as true“All cats can fly. Tom is a cat. So Tom can fly” is perfectly valid and completely false. An argument that is valid and has true premises is called sound. Only sound arguments guarantee a true conclusion.
Demo 4 · prove

How proofs work

A proof is a chain of steps, each one following from the last by a rule everyone accepts. Mathematicians use a handful of strategies over and over. Step through five classics.

Method
Claim
    A proof without words

    The toolkitDirect proof goes straight from what you know. Contrapositive proves “not Q → not P” instead of “P → Q” (they are equivalent). Contradiction assumes the opposite and derives nonsense. Induction proves a first case, then shows each case implies the next, like dominoes.
    Demo 5 · logic in silicon

    Logic gates: a computer that adds

    In 1937 Claude Shannon showed that switching circuits obey George Boole’s algebra of logic. Every chip is built from gates that compute AND, OR, NOT and XOR on 1s and 0s. Five gates make a full adder: tap the inputs and watch it add three bits.

    Inputs A + B + Carry in
    0 + 0 + 0
    Output (Carry out, Sum)
    00 = 0

    The Sum bit is 1 when an odd number of inputs are 1 (two XOR gates). The Carry bit is 1 when at least two are (two ANDs and an OR). Chain 64 of these and you can add 64-bit numbers; real processors use faster designs built from the same gates.

    One gate to rule them allNAND (“not both”) is universal: you can build NOT, AND, OR, XOR and therefore any digital circuit using only NAND gates. NOR is universal too.
    Demo 6 · puzzle

    Knights and knaves

    On Raymond Smullyan’s island, knights always tell the truth and knaves always lie. Tap each islander to call them a knight or a knave. Each statement shows whether your guess makes it consistent: a knight’s words must be true, a knave’s false.

    Status

    The trickTry one possibility and follow it through. If it leads to a knight lying or a knave telling the truth, it’s impossible, so the other possibility must hold. That is proof by contradiction, done in your head.
    Field guide

    Logical fallacies

    A fallacy is a flaw in reasoning that makes an argument seem stronger than it is. Formal fallacies break the rules of logic itself. Informal ones use valid-looking structure but rely on irrelevance, hidden assumptions or slippery words. Spotting the fallacy doesn’t prove the conclusion false, only that this argument doesn’t support it.

    Spot the fallacy

    Score 0 / 0
    Filter

    The fallacy fallacyConcluding that a claim is false just because someone argued for it badly is itself a fallacy. A true conclusion can be defended with a terrible argument.
    Big ideas

    From Aristotle to the limits of proof