8-Bit Computer Made Solely From NAND Gates

One universal logic gate, an unreasonable number of wires, and a surprisingly clear lesson in how computers actually work.

A computer made only from NAND gates sounds like the sort of stunt proposed after too much coffee and one suspiciously inspiring Boolean algebra lecture. Yet it is also a serious demonstration of digital design. An 8-bit NAND computer reduces a CPU to one primitive: a gate that says “not both.” From that tiny refusal, a designer can build arithmetic, registers, instruction control, and a machine that runs programs.

The title is associated with a documented homebrew CPU project that aimed to create processor logic from 74F00 quad NAND chips. Its published concept combined an 8-bit data bus, a 4-bit arithmetic logic unit, a RISC-style instruction set, and a two-stage pipeline, with an aspirational target near one million instructions per second. That is not merely retro-computing theater. It is a magnifying glass held over circuitry that modern processors hide beneath billions of transistors.

Why a NAND-Only 8-Bit Computer Matters

A modern laptop is wonderfully opaque. You press a key, a document appears, and an electronic city begins working somewhere beneath the keyboard. A NAND-only computer makes that city small enough to walk through. Instead of treating an arithmetic logic unit, register, or instruction decoder as a black box, the builder sees the individual logical decisions that make each block behave.

The core lesson is that NAND is functionally complete: any Boolean function can be implemented by connecting enough NAND gates. That includes NOT, AND, OR, XOR, multiplexers, adders, decoders, latches, and control logic. “Enough” is doing heroic lifting in that sentence, but it is true.

Eight bits are an excellent learning size. An 8-bit word represents 0 through 255 when treated as unsigned binary, or –128 through 127 in two’s-complement signed form. It is large enough to demonstrate overflow, branches, and memory addresses, but small enough that a person can trace every line without a map and emergency rations.

What a NAND Gate Does

A two-input NAND gate produces a low output only when both inputs are high:

Y = NOT (A AND B)

That compact truth table is the seed from which the machine grows. Feed one signal into both inputs and the gate becomes an inverter:

NOT A = NAND(A, A)

Invert a NAND output and an AND function appears. Invert both inputs before a NAND operation and an OR function appears through De Morgan’s law. Even XOR, the useful “these inputs differ” operation, can be built from a standard four-NAND arrangement.

From a tiny truth table to useful hardware

A multiplexer selects one of several values according to a control bit, like a railroad switch for data. NAND-built multiplexers let a CPU choose which register feeds a bus or which operand reaches the ALU. Decoders do the reverse: they read a binary code and activate a specific output, allowing an instruction to trigger actions such as load, add, jump, or write.

The catch is physical cost. A familiar one-symbol function on a diagram can become several real gates, several wires, and several opportunities for a misplaced jumper wire to develop a personality.

From Stateless Logic to a CPU

Combinational logic can calculate and route signals, but it cannot remember anything. A computer needs state. Two cross-coupled NAND gates can form a basic set-reset latch with active-low inputs. Because each output feeds back into the other gate, the circuit can settle into one of two stable states and hold a bit.

Add gating, inversion, and a clocking scheme, and NAND networks can implement D latches and flip-flops. Group eight storage cells and you have an 8-bit register. A small CPU needs data registers, an instruction register, a program counter, and status flags. The program counter preserves the location of the next instruction; flags remember details such as a zero or carry result.

Arithmetic follows the same pattern. A full adder takes two input bits and a carry-in, then produces a sum and carry-out. Chain enough full adders and an 8-bit adder emerges. The problem is carry propagation: a carry may need to travel through several stages before the final answer settles. That makes timing a central design challenge rather than a footnote.

Shared data buses create another rule: only the intended source may control a line at one time. A NAND-only architecture can enforce that rule with gating and multiplexing instead of relying on specialized bus hardware. It is educationally pure, even when it is not economical.

Inside the Documented NAND-Only Design

The project behind this title was not content with a classroom circuit that only blinked LEDs. Its builder proposed a CPU using 74F00 devices, each containing four independent two-input NAND gates. The concept specified an 8-bit data bus, a 4-bit ALU, RISC-style instructions, and a two-stage pipeline. The near-1-MIPS figure should be read as a design goal, not a completed benchmark.

The 4-bit ALU is an important architectural clue. “8-bit computer” describes the width of the primary data path, not necessarily every internal operation. A four-bit arithmetic slice can reduce duplicated circuitry, although it requires a disciplined way to handle full 8-bit values.

The two-stage pipeline adds a surprisingly modern touch. Pipelining allows different instructions to occupy different stages during the same period, like a kitchen where one order is being prepped while another cooks. It can improve throughput, but branches, dependencies, and control signals must be carefully timed. Otherwise the CPU can use an old result with the confidence of someone replying to the wrong email thread.

The key constraint is the processor’s logic fabric, not every item on the bench. Power supplies, clocks, switches, LEDs, connectors, and storage have jobs that are not meaningfully replaced by NAND gates. The remarkable part is that the CPU’s functional blocks are built from one universal gate family rather than prepackaged adders, registers, or multiplexers.

Why 74F00 Chips Are Helpfuland Humbling

The 74F00 belongs to the long-running 7400-series logic tradition that made digital circuits modular before microcontrollers compressed whole systems into one chip. A single 74F00 package contains four NAND gates and is designed for fast bipolar logic at a nominal 5-volt supply.

Individual gate delays may be only a few nanoseconds under specified conditions, but a CPU is not one gate wearing a tiny cape. An instruction may travel through register selection, operand routing, arithmetic, flag generation, decoding, and register loading. Every layer adds delay. So do wire length, output loading, fan-out, and real-world signal behavior.

A 5-nanosecond gate does not create a 5-nanosecond computer. It creates an opportunity to do timing math.

Wires, power, and patience

A NAND-only CPU is an exercise in physical engineering as well as logic. Fast edges, long wires, crowded breadboards, and heavy LED loading can create supply noise or signal ringing. Decoupling capacitors placed close to logic IC power pins help provide local transient current and limit electrical noise. They are not decorative confetti.

Inputs must be deliberately defined. A switch is not automatically a clean digital source, and an unconnected input is not a clever way to represent “maybe.” Use suitable pull-up or pull-down arrangements, follow the selected logic family’s data sheet, and include a reset circuit so the computer starts predictably. A random boot is funny once. After that, it is merely a bug with good comic timing.

Clocking deserves equal care. A slow manual clock lets the builder inspect each operation with LEDs, a logic probe, or an oscilloscope. A faster oscillator belongs later, after each register captures the correct value and all control signals settle at the right time. The graceful route to speed is usually slow, visible, and mildly repetitive.

A Practical Learning Path

Start in a logic simulator rather than ordering a mountain of ICs and announcing a three-day build. Verify NAND-built NOT, AND, OR, XOR, a multiplexer, and a latch. Then test a one-bit full adder until every sum-and-carry combination is uninteresting.

Next, make a small register and one ALU slice. Keep the clock slow and expose data and control lines with LEDs. Expand to four bits and eight bits only after the modules work. Then add a program counter, an instruction format, and a modest instruction set. Load, store, add, subtract, jump, conditional branch, and halt can teach more than a giant opcode table that never runs.

Simulation does not replace hardware; it stops hardware from having to solve every conceptual mistake at once. In a simulator, a bad wire is a diagram problem. On a breadboard, it can become a three-hour detective story involving a misplaced jumper, a reversed chip, and an LED that has chosen dramatic irony.

What a NAND Computer Reveals About Modern Machines

Modern CPUs are vastly more complex, but their foundations remain recognizable: logic functions, state, data movement, timing, instruction execution, and memory access. The difference is scale, automation, and astonishing density.

Using only NAND gates also explains why engineers prefer specialized components. A dedicated adder, register, multiplexer, or memory device is usually smaller, clearer, cheaper, and faster than rebuilding the same function from universal gates. Choosing the best component is good engineering. Choosing only NAND gates is good education.

Hands-On Experiences: What a NAND-Only Build Feels Like

The first hands-on experience with a NAND-only computer is rarely “I have built a CPU.” It is usually “Why is this LED on when it has no business being on?” That moment is not failure. It is the admission ticket.

A typical first session begins with one NAND chip, two switches, resistors, and an LED. The truth table looks perfect on paper. In hardware, the builder learns that switch contacts bounce, LEDs need current limiting, and a wire that appears connected may be sitting beside the breadboard hole with enormous confidence. Once the four input combinations finally match the truth table, the victory feels wildly disproportionate. That is part of the charm.

The next experience is abstraction collapsing in a useful way. In a textbook, an XOR gate is a symbol. In a NAND-only build, it becomes several gates and intermediate signals. Build a one-bit adder and the same thing happens. The sum is no longer a tidy equation; it is a physical output that arrives a little later than expected because it must travel through real components.

Adding memory changes the emotional temperature. A cross-coupled latch holds a bit through feedback, which feels almost suspicious the first time it works. Set it, remove the set signal, and the output stays put. Reset it and it changes state. Suddenly, the computer has a past. Add a clocked register, and it has a schedule. Add a program counter, and it has somewhere to be.

Debugging becomes a rhythm. Run at one step per second. Watch the instruction register load. Confirm that the decoder asserts the expected control line. Check that the ALU result settles before the destination register captures it. When something fails, isolate the smallest module that could be wrong. This is less glamorous than waving a logic probe like a wizard’s wand, but it works far more often.

There is also satisfaction that emulators cannot duplicate. A completed board has rows of chips, labeled buses, bundles of wires, and blinking indicators that expose a program moving through hardware. Even a tiny routine that adds two values or loops until a counter reaches zero feels earned. The machine is slow by modern standards, but it is not pretending to be fast. It is showing its work.

The best experience is the changed perspective afterward. A calculator, router, or laptop stops looking like a sealed appliance and starts looking like a distant relative of that messy NAND collection. The fabrication is more advanced and the wiring is less likely to spill onto the floor, but the story is unchanged: values are represented, signals are selected, state is preserved, and logic decides what happens next. Once you have watched that happen one clock pulse at a time, even the smallest blinking LED feels like a very tiny window into modern computing.

Conclusion

An 8-bit computer made solely from NAND gates is not a sensible replacement for a microcontroller, and that is exactly why it is compelling. It turns an abstract claim about universal logic into visible, testable architecture. Starting with “not both,” a builder can create arithmetic, selection, memory, control, and a programmable CPU.

The documented NAND-only concept shows that classic TTL logic can support ambitious architectural thinking. More importantly, it proves that computer design becomes easier to understand when conveniences are removed. The final machine may be bulky, wire-heavy, and occasionally rude about timing, but it offers something modern hardware rarely does: a front-row seat to computation itself.