WEDNESDAY, SEPTEMBER 30, 2026|No. 16990
Technology · Hardware

NAND-16: A Computer Constructed Entirely From NAND Gates

An interactive exploration of the NAND-16, a unique computer built from 277,248 NAND gates, allowing users to play games or delve into its architecture.

An interactive visualization of the NAND-16 computer's architecture.
An interactive visualization of the NAND-16 computer's architecture. · Photo by Umberto on Unsplash
1 sources
Pipeline ingest
3 reads
Positive / Neutral / Negative
0 countries
Related coverage

NAND-16: A Visual Exploration of Computer Architecture

This interactive experience allows you to explore the inner workings of a computer built from NAND gates. You can "Play" the machine, interacting with it as if it were a game console, or "Explore" its architecture in detail.

Playing the Machine

In "Play" mode, your keyboard inputs are sent directly to the machine, acting as its keyboard encoder chip. Use the arrow keys (↑, ↓, ←, →) for directional input, X and Z for pad buttons, and Enter for start and Esc for select. The Space bar inputs character 32. You can also type letters and digits directly.

  • Controls:
  • ↑, ↓, ←, →: Pad up, down, left, right
  • X, Z: Pad A, Pad B (and their characters)
  • Enter: Pad start (and its character)
  • Esc: Pad select (and its character)
  • Space: Character 32
  • Letters, digits: Typed characters
  • Tab: Switch between Play and Explore modes
  • Home: Fly back to the desk
  • End: Fly to the screen (playing view)
  • Mouse:
  • Wheel: Zoom toward the cursor
  • Drag / Right-drag: Pan / Orbit
  • Double-click: Fly into a chip or block; on the monitor: fly to that pixel's latch
  • Click: Inspect a gate or block (click the monitor to play)
  • Right-click: Open a gate in the Fault Lab, ready to break

Exploring the Architecture

"Explore" mode gives you a deeper look into the computer's design. You can control the camera, use various tools, and even run curated experiments.

  • Controls:
  • P, Space: Run / Pause
  • [ ]: Clock dial: slower / faster
  • . , / T: Step an edge, a cycle, an instruction, a tick
  • B: Bullet time: record one cycle, replay it gate delay by gate delay; press B again to resume.
  • ←, →: Bullet time: advance one gate delay (hold Shift for 10)
  • C: Bullet time: show the critical path of the current edge
  • F: Open the Fault Lab
  • 0, 1: Fault Lab: set selected gate to stuck-at 0 or 1
  • R: Fault Lab: release all faults
  • L: Logic analyzer
  • H: Toggle more / less machine detail
  • A: Audit a cycle now
  • G: Start the Genesis tour (use ←/→ for chapters, Enter to prove, M to see in the machine)
  • Esc: Deselect / Close
  • ?: Show this card

Key Features

  • Genesis: Explore the invention of this computer from a single gate through 15 chapters. You can "prove it" and "see it in the machine."
  • Fault Lab: Break individual gates and observe the consequences.
  • Clocks: Control the speed, pause, and step through time with "bullet time" for detailed analysis.
  • Logic Analyzer: View waveforms of buses and clocks.
  • Machine View: Monitor speeds, registers, and audit the machine's state. Gate counts are also displayed.
  • Desk View: Get an overview of the entire machine.

Auditing and Performance

Everything displayed on screen is read directly from the NAND gates' own nets or measured. The audit function (top right) re-executes sampled cycles with an independent evaluator and flags any mismatches in red.

  • Machine Status: Running at 16.4 kHz with 0.0% slip.
  • Performance Metrics: Gate evaluations (23.1 M/s), instructions (4.0 k/s), cycles/instructions (160,315 / 58,446).
  • Current Instruction: st r0, [r0-9] at kbd.s:98 (fetch cycle).
  • Gate Count: 277,248 NAND gates.

Curated Experiments

Choose from a list of pre-defined experiments to test specific aspects of the machine:

  • 1A: Dead video bank
  • 2A: Broken carry
  • 3A: Invisible block
  • 4A: Stuck key
  • 5A: bne is never taken
  • 6A: Weaker random number generator
  • 7A: No φ2

Getting Started

To begin, you can "Pick a gate" and zoom into the chip until the NANDs appear, then click one. Alternatively, double-click a pixel on the monitor to fly to the latch that stores it, or run a curated experiment. You can also start a program like NANDTRIS or SNAKE.

PAN's pipeline reviewed approximately 1 open sources for this article. No human editor reviewed this article before publication.

Related Reads

Show on timeline →