A processor can handle one bit at a time without doing only one thing at a time. That’s the idea behind zpekic’s bit-serial CPU project on Hackaday.io: use a programmable crossbar to move and process several streams of bits together. An implemented stack-based integer calculator gives the architecture something concrete to do, rather than leaving it as a wiring proposal.
The supplied logs run from April to September 2022. They document both the calculator’s arithmetic and a revealing hardware change: replacing two physical crossbar chips with a digital equivalent inside the FPGA. The interesting question throughout is how much useful work the machine can squeeze out of each trip through its serial registers.
Connections do part of the computing
The architecture puts a switch matrix between shift registers and small processing elements. Register outputs and processing-element outputs feed the matrix’s rows; its columns feed their inputs. Microcode selects which connections are active.
A register preserves its value by feeding its outgoing bit back into its own input. After a full word’s worth of shifts—16 or 32 in the calculator—it has returned to its original state. That circulating path is the machine’s basic no-operation arrangement.
Change the connections, though, and the same trip becomes useful. Two registers can exchange values by feeding each other, without a temporary register. A value can go to several destinations at once. A register whose input column has no active connection fills with zeros because the column is pulled low.
The project also uses the matrix as a wired-OR network: selected inputs can contribute to one column’s result. In the overview’s four-register example, a single word-length pass swaps two registers, clears a third and writes an OR combination into the fourth. The bits still travel serially, but the register updates happen together.
That distinction is the project’s central promise. It doesn’t make an individual serial addition instantaneous; it lets other useful transfers share the same pass.
A small ALU with a configurable route
Arithmetic needs surprisingly little state. The full adder retains a carry bit between successive bit positions. An inverter supplies the complemented operand for subtraction, while a separate delay flip-flop supports shifts and rotates.
For subtraction, the microcode sets the initial carry and routes one operand through the inverter before adding from least significant bit to most significant bit. A comparison can use the subtraction’s carry result without storing the computed difference. The routing determines not just where operands come from, but whether—and where—the result gets written.
The calculator makes practical use of this flexibility. In the May 1 addition and subtraction log, the top two stack entries feed the adder while the remaining stack registers move into their post-pop positions. Arithmetic and stack maintenance therefore share the serial pass. The creator reports a working carry result, but explicitly notes that an overflow status bit was not implemented.
By the May 8 integer-square-root entry, division, comparison and subtraction were available to reuse in an iterative routine. It calculates successive guesses using x1 = (x0 + s / x0) / 2, treating the argument as unsigned and supporting full 32-bit inputs. This is a useful demonstration of the architecture’s reach: a small collection of bit-level operations can support a more involved calculation through microcode.
There are limits to the concurrency. Multiplication uses repeated shift-and-add steps, and division also requires repeated serial work. Some routines consume the bottom stack register as temporary storage. The crossbar provides flexible data paths, not an unlimited supply of independent arithmetic units.
What changed when the wires disappeared
The original implementation used two MT8816 crossbar ICs on a breadboard, connected to the FPGA through wires more than six inches long. In the September 6 speed log, zpekic reports difficulty running the CPU above roughly 2 MHz and suspects the wiring’s electrical effects and signal skew. That’s the creator’s diagnosis, rather than an isolated measurement of the cause.
To test a different arrangement, zpekic built an FPGA-resident replacement called MT16x16. It doesn’t reproduce the chips’ general analog-switch behavior. Instead, it reproduces the digital OR behavior this CPU actually needs.
The replacement stores 256 connection bits for a 16-by-16 matrix. Each bit enables or disables a row signal’s contribution to a column; the 16 gated contributions are ORed together to produce that column’s output. It’s a direct digital expression of the routing rule, with no external matrix wiring in the signal path.
With that version, zpekic reports a 25 MHz drive clock, corresponding to 6.25 MHz microcode execution because the design uses a four-phase clock. Those are different rates, and neither means 25 million complete calculator operations per second. A calculator command still has to configure paths, traverse words and, for more involved arithmetic, repeat loops.
The same log identifies possible control-design improvements, including a different encoding that the creator thought might remove the need for four-phase timing. That remains a proposed refinement in the supplied material, not a demonstrated result.
Count the work, not just the clock
The April 25 benchmark log takes a helpful approach to measurement: an internal counter records busy cycles per instruction while excluding waits for UART transmission. That separates computation from the slower business of printing results.
Its broader lesson is that one-pass operations scale with word length plus setup overhead, while more involved routines can require work proportional to the square of the word length. Faster routing helps both, but doesn’t erase their algorithmic differences.
For builders exploring the linked project repository, the useful next comparison would be the same calculator workload on each matrix implementation, with configuration costs and serial passes counted separately. That would show where the crossbar’s concurrency earns its keep—and where the machine is still spending most of its time moving one bit after another.