Suppose you can only draw in pure black and white — no grays at all. How do you show a smooth gradient? You scatter dots. Where the picture should be light, leave white space; where it should be dark, crowd the black dots together. Step back, and your eye blurs the dots into shades that were never really there. That's dithering: trading the colours you don't have for a pattern your eye averages into the colour you want. Scroll through to see it work.
Here's a smooth grayscale ramp reduced to a tiny palette three ways. Threshold just rounds each pixel to the nearest colour — fast, but it tears the gradient into flat bands (posterisation). Ordered dithering adds a repeating Bayer pattern so the rounding wobbles in a fixed grid. Floyd–Steinberg carries each pixel's rounding error to its neighbours, scattering organic dots — and clearly looks best. Drop the palette to 2 colours and zoom in to see the actual dots.
The left panel is a smooth grayscale source — paint on it with your mouse (drag to draw, the brush adds light) or load a fresh gradient. Press Run Floyd–Steinberg and watch the dither sweep across row by row: each pixel snaps to the nearest palette colour, and the error it makes is pushed onto the neighbours still ahead of it (7/16 right, then 3/16, 5/16, 1/16 below). Fewer colours → more visible dots.
A pixel might want to be 60% gray, but your palette only has 0% and 100%. Round it to white and you've made an error of −40%; round to black, +60%. Banding happens because every pixel in a region makes the same rounding mistake in the same direction, so the error piles up into a visible flat step. Dithering's trick is to make neighbouring pixels round in different directions, so the errors cancel out on average — and the average is exactly the shade you wanted.
Ordered (Bayer) dithering compares each pixel against a fixed threshold map — a small recursively-built matrix tiled across the image. It's stateless, cheap, and parallel (great for GPUs and shaders), but it leaves a faint regular crosshatch. Floyd–Steinberg error diffusion instead tracks the leftover error and spreads it forward to not-yet-drawn neighbours with the weights 7/16, 3/16, 5/16, 1/16. Because the error is conserved rather than discarded, the result has the right local average everywhere, producing scattered, organic dots that read as the smoothest of the three — at the cost of being sequential.
Dithering is everywhere a signal must be squeezed into too few levels. 8-bit & GIF art faked thousands of shades from a 256-colour palette this way. Printing & newspapers use halftoning — the same idea with dots of varying size — to render photos in pure black ink. Audio dithering adds tiny shaped noise before reducing bit depth (e.g. 24-bit → 16-bit for CD), turning ugly quantisation distortion into a faint, benign hiss. The thread is identical: spend a pattern to buy back resolution you don't have.