Nibbles
One mechanism in three or four stages, each one reachable only through the one before. Lives on logicalart.us.
Everything here, in one chronology, is on the studio index. The smaller pieces are bits, and the whole machines are bytes.
-

Sampling
The same samples fit two different waves, and nothing in them says which one you had.
/nibbles/sampling/ -

The Middle Square
An early way of making random numbers by arithmetic, and it dies: every seed there is falls into one of eight short cycles.
/nibbles/middle-square/ -

Score Reel
An electromechanical table cannot add, it can only count at the speed of a motor.
/nibbles/score-reel/ -

Huffman
The two rarest symbols marry, and the tree that falls out is provably the best code of its kind.
/nibbles/huffman/ -

Core Memory
Half a current does not flip the core. Reading the bit is what destroys it.
/nibbles/core-memory/ -

Carry-Lookahead Adder
Stop waiting for the carry to ripple and work out where every carry is born.
/nibbles/carry-lookahead/ -

The Call Stack
Recursion spends memory that appears in no line of the source. You can work out the exact depth it dies at.
/nibbles/call-stack/ -

Garbage
Memory becomes garbage when nobody can reach it, not when somebody says it is finished.
/nibbles/garbage/ -

Reed-Solomon
Erase the bytes you can see are gone and the equations hand them back.
/nibbles/reed-solomon/ -

The Pipeline
The next instruction starts before this one finishes, until it needs something that does not exist yet.
/nibbles/pipeline/ -

Round Robin
Every program believes it owns the processor because none of them gets to keep it.
/nibbles/round-robin/ -

The System Call
One digit of the function code decides whether the hardware obeys the instruction or files it.
/nibbles/system-call/ -

Context Switch
Your program is stopped between two instructions, its registers are copied somewhere, another program runs for a while, and then everything is put back so precisely that it cannot tell.
/nibbles/context-switch/ -

The Shuffle
The obvious way to shuffle a list is biased above two cards, and you can prove it by counting rather than by measuring.
/nibbles/seeded-shuffle/ -

Packet Switching
Each station is destroyed at random, and the network is measured by how much of it still holds together.
/nibbles/packet-switching/ -

Out of Order
The processor reorders your instructions, runs them in an order you never wrote, and is required to produce the answer you would have got anyway.
/nibbles/out-of-order/ -

Deadlock
Each program is waiting for the other to release the thing it cannot release.
/nibbles/deadlock/ -

The Semaphore
The count is the permission, and no process has to know which other one is waiting.
/nibbles/semaphore/ -

Fragmentation
There is enough free memory for the request and the request still fails.
/nibbles/fragmentation/ -

SIMD
One instruction, many lanes, and the speedup stops being the number of lanes the moment the data disagrees.
/nibbles/simd/ -

Fifteen Planes
It passes every easy test. Then everything lands on fifteen planes.
/nibbles/fifteen-planes/ -

DRAM Refresh
The bit disappears unless the machine keeps reading it and writing it back.
/nibbles/dram-refresh/ -

Regular Expressions
The search holds every state at once, which is why it never has to go back and can never be made to take forever.
/nibbles/regex/ -

Page Replacement
Giving a program more memory can make it fault more, and the obvious algorithm is where it happens.
/nibbles/page-replacement/ -

Metastability
Catch a flip-flop at the wrong instant and it cannot promise when it decides.
/nibbles/metastability/ -

Backoff
Two machines transmit on the same wire. Both back off for a random interval.
/nibbles/backoff/ -

Sequence Numbers
The stream arrives in order and nothing underneath it is in order.
/nibbles/sequence-numbers/ -

Compare and Swap
Change it only if the value is still the one you last read.
/nibbles/compare-and-swap/ -

Z-Buffer
Draw the triangles in any order and every pixel still keeps the nearest one.
/nibbles/z-buffer/ -

Goodhart planned
It ranked them correctly for years, and then a cheaper way to raise it arrived.
-

Diffie-Hellman
The secret is not among the things that crossed the wire, and everything that did is on the screen.
/nibbles/diffie-hellman/ -

Arithmetic Coding
The whole message becomes one number in an interval that keeps shrinking.
/nibbles/arithmetic-coding/ -

Two-Phase Commit
Everyone promises before anyone acts, and a coordinator lost at the wrong moment blocks them all.
/nibbles/two-phase-commit/ -

Logical Clock
The clocks disagree and the machines still agree on an order that never puts an effect before its cause.
/nibbles/logical-clock/ -

Line Discipline planned
The end of a file is not a character you can type. It is a read that comes back empty.
-

Shell Expansion planned
The line you typed is rewritten before it runs, and the order decides which files it touches.
-

Branch Prediction
The processor runs an instruction before knowing whether it should exist.
/nibbles/branch-prediction/ -

Write-Ahead Log
The database says done before half the database has been written.
/nibbles/write-ahead-log/ -

False Sharing
Two threads, two variables, nothing shared. In one cache line they still fight.
/nibbles/false-sharing/ -

Premultiplied Alpha
Average straight colour and the cut-out's edge picks up whatever the transparent pixels hide.
/nibbles/premultiplied-alpha/ -

Quantum Interference
Measured once it is fifty-fifty, and the same step twice gives one answer every time.
/nibbles/quantum-interference/ -

Spanning Tree
One spare cable and the network drowns; cut the right links and it is safe.
/nibbles/spanning-tree/ -

Slow Start
Nobody tells TCP how fast it may send. It finds out by hurting the network.
/nibbles/slow-start/ -

Vector Clock
Each machine counts everyone's messages, so it can tell concurrent from caused.
/nibbles/vector-clock/ -

Catastrophic Cancellation
The subtraction is exact and loses nothing, which is what makes it ruinous.
/nibbles/cancellation/ -

Longest Chain
History goes to the chain with the most accumulated work, not the one that actually cost the most.
/nibbles/longest-chain/ -

PNG Filters
The compression happens after something else has made the bytes boring.
/nibbles/png-filters/ -

Gamma
The numbers are not brightness, which is why the average of two of them is the wrong colour.
/nibbles/gamma/ -

Consistent Hashing
Add one more server and almost every key stays where it was.
/nibbles/consistent-hashing/ -

AES
Sixteen bytes go in, and every byte that comes out depends on every byte that went in.
/nibbles/aes/ -

Merge Collapse
The sort behind python, java, android and v8, and the invariant it did not keep.
/nibbles/merge-collapse/ -

Futex planned
A lock that never asks the kernel for anything until two threads want it at once.
-

Merkle DAG
A commit holds hashes pointing at hashes, and never holds your repository.
/nibbles/merkle-dag/ -

Majority
A write counts once most machines have it, and no later majority can miss it.
/nibbles/majority/ -

Consensus planned
One of them is elected to speak, and the decision survives losing it.
-

TLS Handshake
Everybody hears the conversation that agrees the key nobody else has.
/nibbles/tls-handshake/












































