Fourbit strips a computer down to a question you can follow signal by signal: how does data get from memory into registers, through an arithmetic operation and back again? On Hackaday.io, jaromir.sukuba’s Fourbit project answers with a small 4-bit CPU designed from 74xx logic. The goal is understanding the machinery, not competing with even an old 8080.
The project was created on April 1, 2014. In a comment that same day, its creator reported designing, soldering and bringing it to life over one weekend, describing the result as a CPU with a tiny amount of memory for simple demonstration tasks.
A shared bus makes every transfer explicit
Fourbit’s registers use a 74HCT574 latch to hold data and a separate 74HCT245 bus driver to place that data onto the shared data bus. Each register has its own write-enable and output-enable controls.
Why use two chips when the latch already has output control? The design needs a register’s value to remain available locally even when it isn’t driving the bus. Separating storage from bus access lets that value feed other circuitry without putting it on the shared connection.
That distinction is central to the machine: holding a value and being allowed to drive the bus are different jobs. The control logic has to arrange both.
The ALU does arithmetic; the registers make it usable
A 74181 supplies the 4-bit arithmetic and logic unit. Registers A and B feed its inputs, while control signals select the operation. Because the ALU lacks tri-state outputs, another bus driver controls when its result reaches the data bus.
The ALU is combinational logic: its result responds to its inputs rather than waiting for an instruction to finish. That makes writing a result back into an input register a timing concern. Change A, and the ALU’s output can change too.
The creator’s solution is a third register, T, for temporary storage. Fourbit first captures the ALU result in T, then transfers that saved value into A. The write-up presents this extra step as a way to keep the result secure while changing an operand. It’s a useful detail because it exposes work that a software expression hides: an addition is not just an arithmetic function, but a sequence of controlled transfers.
Counting instructions is another hardware job
Two chained 74HCT193 counters form the program counter. An EEPROM holds the program, and an instruction register keeps the current instruction available while it executes. The counters can advance to the next instruction or accept a preset value for a jump.
These parts provide the storage and data paths, but they don’t decide when to act. That falls to the instruction decoder, which sequences the control signals. The visible project description begins explaining that decoder and instruction set, but stops before giving the complete account. The linked Fourbit repository is a further resource for anyone wanting to investigate the design beyond this overview.
Fourbit’s useful lesson is the separation between calculation and coordination. A dedicated ALU chip supplies the arithmetic; making a CPU means arranging who drives the bus, what captures the value and when execution moves on. For someone studying the design, tracing one result from A and B through the ALU, into T and back to A is a concrete place to start.
Source: Fourbit
