Special-purpose hardware built to reject wrong answers fast, before handing the few survivors to a slower, smarter processor, is a pattern that goes back a century and still shows up in Bitcoin ASICs, camera autofocus chips, and the interrupt filters on your own microcontroller board. Maker KB Sriram just gave that pattern a literal history lesson: he rebuilt a 1982 electronic number sieve, chip for chip, using parts you can order today.
The build
Sriram’s project, called A Tiny Sieve, swaps each of the original design’s ROM-and-counter pairs for an ATtiny412 microcontroller. Thirty of them plug into a shared backplane, and a single RP2040 runs the show: it generates the clock, advances every ATtiny in lockstep, and only bothers with real math once a candidate number survives all 30 checks. Each ATtiny owns one modulus and stores its own accept-or-reject pattern in flash. If a chip decides a number can’t be a solution, it pulls a shared open-drain line, Sriram calls it VOTE, low. Silence from all 30 chips is the only signal that gets the RP2040 to run its slower verification step.
Why the numbers check out
Sriram didn’t just build the thing, he audited it against history. He reran published problems from D. H. Lehmer’s 1928 bicycle-chain sieve (19 chains on a shaft), a 1932 steel-gear version, and a 1965 delay-line machine, and every result matched, except where he found small errors in the original papers, including an incorrect period calculation on the 1933 gear machine. His RP2040-driven rebuild runs at roughly 500,000 candidates per second, about 100 times the throughput of the 1932 gear machine, using the same reject-fast-verify-slow architecture. The open-drain VOTE bus is worth stealing for your own projects: it’s the same wired-AND trick I2C uses for clock stretching, and it scales to as many nodes as you can fit on a backplane without adding an extra GPIO pin per chip.
Where to take it
You don’t need 30 chips to try this pattern. A single ATtiny412, about $0.40 in volume, paired with a Pi Pico is enough to prototype a reject-fast filter for a school robotics project: throw out bad sensor readings before your main loop touches them, or gate noisy ADC samples on a line-following bot. Read Sriram’s full write-up and source files linked from the Hackster.io project page, then try wiring two spare GPIO pins as an open-drain vote line between two microcontrollers before you scale up.
Frequently Asked Questions
What is a hardware number sieve, and why did KB Sriram rebuild one with microcontrollers?
A number sieve is dedicated hardware that quickly rejects numbers that cannot be solutions to a math problem, before a slower processor checks the few survivors. Sriram recreated a 1982 ROM-and-counter sieve using 30 ATtiny412 chips and an RP2040 to see how closely modern microcontrollers could match decades-old purpose-built hardware, and to learn from a nearly forgotten branch of computing history.
What hardware does the ATtiny Sieve project actually use?
Thirty ATtiny412 microcontrollers, each handling one modulus, plug into a shared backplane. A single RP2040 generates the clock, steps all 30 chips in lockstep, and reads a shared open-drain VOTE line to know when a candidate number has survived every check and is worth the slower math.
What will I learn if I build a project like this?
You’ll get hands-on practice with multi-chip synchronization, open-drain (wired-AND) bus design, the same electrical trick I2C uses for clock stretching, and reject-fast-verify-slow filtering, a pattern useful in sensor pre-processing for robotics and IoT builds, plus a real link to number theory and the history of computing hardware.
