Logic is something a switch can do. Put switches in series and in parallel and you have AND and OR; put full adders in a row and you can watch the carry run to the left; let marbles fall through toggles and they count in binary.
Shannon, 1937. In his master's thesis Claude Shannon showed that circuits of relays and switches obey Boole's algebra of logic: series is AND, parallel is OR, a contact that opens when its coil is energised is NOT. Simplifying a circuit became simplifying a formula, and the other way round.
The staircase. Two-way switches at the top and bottom of a stair, wired through two travellers, give XOR: the lamp changes whenever either switch is flipped. Electricians wired this long before anyone called it a gate.
One gate is enough. NAND alone makes every other gate: NOT a is a NAND a, AND is NAND followed by NOT, OR is NAND of the two NOTs. Relays gave way to valves and then transistors, but the algebra did not change.
Click a bit to flip it, then run the adder to watch the carries. Each full adder takes two gate delays to pass its carry on, so the last sum bit is not right until every adder to its right has finished. Try 15 + 1: the carry has to cross all four.
A full adder. It adds three bits, a, b and the carry in. The sum is a XOR b XOR carry; the carry out is 1 when at least two of the three are 1, which is (a AND b) OR ((a XOR b) AND carry). Five gates.
Ripple. Chain n of them and the answer is right only after the carry has had time to travel the whole row: 2n gate delays here. A 64-bit ripple adder would wait 128. Real processors use carry-lookahead, which works out in advance where a carry will be born and where it will be passed on, and finishes in a time that grows like log n.
On paper too. Column addition is the same machine, one decimal digit at a time, and the abacus shows the same ripple when a 9 turns over. Mechanical calculators had to solve it with gears: Pascal's machine let a falling weight push the carry on, and the Addiator, a pocket slide adder, makes you carry by hand by running the stylus round a hook.
Each toggle tips left (0) or right (1). A marble tips the first toggle over. If the toggle goes from 0 to 1 it keeps the marble; if it goes from 1 to 0 it lets the marble roll on to the next. Read the toggles from the bottom up and they are the count in binary.
The carry is a marble. Flipping a 1 to a 0 and passing something on is exactly the carry in binary addition. Adding one to 0111 sends the marble through three toggles before the fourth catches it: 1000.
Marble machines. Wooden binary counters of this kind are an old woodworker's project, and toys such as Digi-Comp II (1960s) and Turing Tumble (2017) build whole computers from falling balls and flip-flops: adders, counters, even multiplication.
Why binary. A toggle has two stable states and needs no reading of how far it has turned. That is why switches, relays and transistors all count in base two: a decimal wheel needs ten positions held apart, a toggle only two.